浏览代码

Merge pull request #10129 from zz85/eslint

Add MrDoob Code Style ESLint support
Mr.doob 8 年之前
父节点
当前提交
7fd942d289
共有 2 个文件被更改,包括 9 次插入0 次删除
  1. 6 0
      .eslintrc
  2. 3 0
      package.json

+ 6 - 0
.eslintrc

@@ -0,0 +1,6 @@
+{
+  "extends": "mdcs",
+  "parserOptions": {
+    "sourceType": "module"
+  }
+}

+ 3 - 0
package.json

@@ -27,6 +27,7 @@
     "build-uglify": "rollup -c && uglifyjs build/three.js -cm --preamble \"// threejs.org/license\" > build/three.min.js",
     "build-uglify": "rollup -c && uglifyjs build/three.js -cm --preamble \"// threejs.org/license\" > build/three.min.js",
     "build-closure": "rollup -c && java -jar utils/build/compiler/closure-compiler-v20160713.jar --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs utils/build/externs.js --language_in=ECMASCRIPT5_STRICT --js build/three.js --js_output_file build/three.min.js",
     "build-closure": "rollup -c && java -jar utils/build/compiler/closure-compiler-v20160713.jar --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs utils/build/externs.js --language_in=ECMASCRIPT5_STRICT --js build/three.js --js_output_file build/three.min.js",
     "dev": "rollup -c -w",
     "dev": "rollup -c -w",
+    "lint": "eslint src",
     "test": "echo \"Error: no test specified\" && exit 1"
     "test": "echo \"Error: no test specified\" && exit 1"
   },
   },
   "keywords": [
   "keywords": [
@@ -42,6 +43,8 @@
   },
   },
   "homepage": "http://threejs.org/",
   "homepage": "http://threejs.org/",
   "devDependencies": {
   "devDependencies": {
+    "eslint": "^3.10.1",
+    "eslint-config-mdcs": "^4.2.1",
     "rollup": "^0.36.3",
     "rollup": "^0.36.3",
     "rollup-watch": "^2.5.0",
     "rollup-watch": "^2.5.0",
     "uglify-js": "^2.6.0"
     "uglify-js": "^2.6.0"