浏览代码

chore: Use @excalidraw/eslint-config (#3142)

Lipis 4 年之前
父节点
当前提交
418589e7ad
共有 3 个文件被更改,包括 8 次插入36 次删除
  1. 2 36
      .eslintrc.json
  2. 1 0
      package.json
  3. 5 0
      yarn.lock

+ 2 - 36
.eslintrc.json

@@ -1,40 +1,6 @@
 {
-  "extends": ["prettier", "react-app"],
-  "plugins": ["prettier"],
+  "extends": ["@excalidraw/eslint-config", "react-app"],
   "rules": {
-    "@typescript-eslint/no-unused-vars": "warn",
-    "curly": "warn",
-    "dot-notation": "warn",
-    "import/no-anonymous-default-export": "off",
-    "no-console": [
-      "warn",
-      {
-        "allow": ["warn", "error", "info"]
-      }
-    ],
-    "no-else-return": "warn",
-    "no-lonely-if": "warn",
-    "no-restricted-syntax": [
-      "warn",
-      {
-        "message": "Use 't(...)' instead of literal text in JSX",
-        "selector": "JSXText[value=/\\w/]"
-      }
-    ],
-    "no-unneeded-ternary": "warn",
-    "no-unused-expressions": "warn",
-    "no-useless-return": "warn",
-    "no-var": "warn",
-    "object-shorthand": "warn",
-    "one-var": ["warn", "never"],
-    "prefer-arrow-callback": "warn",
-    "prefer-const": [
-      "warn",
-      {
-        "destructuring": "all"
-      }
-    ],
-    "prefer-template": "warn",
-    "prettier/prettier": "warn"
+    "import/no-anonymous-default-export": "off"
   }
 }

+ 1 - 0
package.json

@@ -49,6 +49,7 @@
     "typescript": "4.1.5"
   },
   "devDependencies": {
+    "@excalidraw/eslint-config": "1.0.0",
     "@excalidraw/prettier-config": "1.0.2",
     "@types/lodash.throttle": "4.1.6",
     "@types/pako": "1.0.1",

+ 5 - 0
yarn.lock

@@ -1285,6 +1285,11 @@
     minimatch "^3.0.4"
     strip-json-comments "^3.1.1"
 
+"@excalidraw/eslint-config@1.0.0":
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/@excalidraw/eslint-config/-/eslint-config-1.0.0.tgz#1cc527a88cfe20fd730496c1b631c3aecf9c825e"
+  integrity sha512-5SQFsQXO4vzny7OFSJr/DDPr1Mzeh6w0uwmZ0Fk2qjBcS5nhPtnx5KOTRPmpc6Hf5Ao57WK/MKI4lhCzw66V/A==
+
 "@excalidraw/prettier-config@1.0.2":
   version "1.0.2"
   resolved "https://registry.yarnpkg.com/@excalidraw/prettier-config/-/prettier-config-1.0.2.tgz#b7c061c99cee2f78b9ca470ea1fbd602683bba65"