Browse Source

Merge pull request #16494 from gkjohnson/lint-ts-files

Add support for linting typescript files
Mr.doob 6 years ago
parent
commit
bf329111bf
1 changed files with 11 additions and 3 deletions
  1. 11 3
      package.json

+ 11 - 3
package.json

@@ -25,10 +25,15 @@
     "test": "test"
   },
   "eslintConfig": {
+    "parser": "@typescript-eslint/parser",
     "extends": "mdcs",
     "plugins": [
-      "html"
-    ]
+      "html",
+      "@typescript-eslint"
+    ],
+    "rules": {
+      "@typescript-eslint/no-unused-vars": 1
+    }
   },
   "scripts": {
     "build": "rollup -c",
@@ -38,7 +43,7 @@
     "dev": "concurrently --names \"ROLLUP,HTTP\" -c \"bgBlue.bold,bgGreen.bold\" \"rollup -c -w -m inline\" \"http-server -c-1 -p 8080\"",
     "dev-test": "concurrently --names \"ROLLUP,ROLLUPTEST,HTTP\" -c \"bgBlue.bold,bgRed.bold,bgGreen.bold\" \"rollup -c -w -m inline\" \"rollup -c test/rollup.unit.config.js -w -m inline\" \"http-server -p 8080\"",
     "start": "npm run dev",
-    "lint": "eslint src",
+    "lint": "eslint src --ext js --ext ts",
     "test": "npm run build-test && qunit test/unit/three.source.unit.js",
     "travis": "npm run lint && npm test"
   },
@@ -59,6 +64,9 @@
     "eslint": "^5.16.0",
     "eslint-config-mdcs": "^4.2.3",
     "eslint-plugin-html": "^5.0.3",
+    "@typescript-eslint/parser": "^1.9.0",
+    "@typescript-eslint/eslint-plugin": "^1.9.0",
+    "typescript": "^3.4.5",
     "google-closure-compiler": "20190415.0.0",
     "http-server": "^0.11.1",
     "qunit": "^2.9.2",