Browse Source

Eslint: add support for class properties (#21678)

Marco Fugaro 4 years ago
parent
commit
916ed1e848
3 changed files with 16 additions and 5964 deletions
  1. 1 5964
      package-lock.json
  2. 7 0
      package.json
  3. 8 0
      utils/build/.babelrc.json

File diff suppressed because it is too large
+ 1 - 5964
package-lock.json


+ 7 - 0
package.json

@@ -29,6 +29,12 @@
   "eslintConfig": {
     "root": true,
     "extends": "mdcs",
+    "parser": "@babel/eslint-parser",
+    "parserOptions": {
+      "babelOptions": {
+        "configFile": "./utils/build/.babelrc.json"
+      }
+    },
     "plugins": [
       "html"
     ],
@@ -92,6 +98,7 @@
   "homepage": "https://threejs.org/",
   "devDependencies": {
     "@babel/core": "^7.13.15",
+    "@babel/eslint-parser": "^7.13.14",
     "@babel/plugin-proposal-class-properties": "^7.13.0",
     "@babel/preset-env": "^7.13.15",
     "@rollup/plugin-babel": "^5.3.0",

+ 8 - 0
utils/build/.babelrc.json

@@ -9,5 +9,13 @@
         "bugfixes": true
       }
     ]
+  ],
+  "plugins": [
+    [
+      "@babel/plugin-proposal-class-properties",
+      {
+        "loose": true
+      }
+    ]
   ]
 }

Some files were not shown because too many files changed in this diff