Procházet zdrojové kódy

extract eslint rules from package.json (#1480)

Youssef Meskini před 5 roky
rodič
revize
28f4ee5783
2 změnil soubory, kde provedl 30 přidání a 39 odebrání
  1. 30 0
      .eslintrc
  2. 0 39
      package.json

+ 30 - 0
.eslintrc

@@ -0,0 +1,30 @@
+{
+  "extends": ["prettier", "react-app"],
+  "plugins": ["prettier"],
+  "rules": {
+    "curly": "warn",
+    "no-console": [
+      "warn",
+      {
+        "allow": ["warn", "error", "info"]
+      }
+    ],
+    "no-else-return": "warn",
+    "no-useless-return": "warn",
+    "prefer-const": [
+      "warn",
+      {
+        "destructuring": "all"
+      }
+    ],
+    "prefer-template": "warn",
+    "prettier/prettier": "warn",
+    "no-restricted-syntax": [
+      "warn",
+      {
+        "selector": "JSXText[value=/\\w/]",
+        "message": "Use 't(...)' instead of literal text in JSX"
+      }
+    ]
+  }
+}

+ 0 - 39
package.json

@@ -57,45 +57,6 @@
   "engines": {
     "node": ">=12.0.0"
   },
-  "eslintConfig": {
-    "extends": [
-      "prettier",
-      "react-app"
-    ],
-    "plugins": [
-      "prettier"
-    ],
-    "rules": {
-      "curly": "warn",
-      "no-console": [
-        "warn",
-        {
-          "allow": [
-            "warn",
-            "error",
-            "info"
-          ]
-        }
-      ],
-      "no-else-return": "warn",
-      "no-useless-return": "warn",
-      "prefer-const": [
-        "warn",
-        {
-          "destructuring": "all"
-        }
-      ],
-      "prefer-template": "warn",
-      "prettier/prettier": "warn",
-      "no-restricted-syntax": [
-        "warn",
-        {
-          "selector": "JSXText[value=/\\w/]",
-          "message": "Use 't(...)' instead of literal text in JSX"
-        }
-      ]
-    }
-  },
   "homepage": ".",
   "husky": {
     "hooks": {