Browse Source

尝试通过修改eslint配置规避decoratorsBeforeExport错误

xiaoct 7 years ago
parent
commit
69b6c34be2
1 changed files with 13 additions and 1 deletions
  1. 13 1
      .eslintrc.js

+ 13 - 1
.eslintrc.js

@@ -1,4 +1,16 @@
 module.exports = {
 module.exports = {
     "parser": "babel-eslint",
     "parser": "babel-eslint",
-    "extends": 'umi'
+    "extends": 'umi',
+    "parserOptions": {
+        "ecmaVersion": 2019,
+        "sourceType": "module",
+        "impliedStrict": true,
+        "ecmaFeatures": {
+            "jsx": true,
+            "impliedStrict": true,
+            "globalReturn": false,
+            "experimentalObjectRestSpread": true,
+            "legacyDecorators": true
+        }
+    },
 };
 };