]> git.openstreetmap.org Git - rails.git/blobdiff - config/eslint.js
Move eslint ignore rules to the configuration file
[rails.git] / config / eslint.js
index b99179d27a4b200e7c9337e171cf33314d781551..1bf65695b6e24473fc10d250c9ef6356c07794f7 100644 (file)
@@ -6,6 +6,14 @@ const stylisticJs = require("@stylistic/eslint-plugin-js");
 module.exports = [
   js.configs.recommended,
   erb.configs.recommended,
+  {
+    ignores: [
+      "app/assets/javascripts/i18n/",
+      "coverage/assets/",
+      "public/assets/",
+      "vendor/"
+    ]
+  },
   {
     plugins: {
       "@stylistic": stylisticJs
@@ -21,7 +29,6 @@ module.exports = [
         L: "readonly",
         OSM: "writable",
         Matomo: "readonly",
-        Qs: "readonly",
         Turbo: "readonly",
         updateLinks: "readonly"
       }
@@ -87,7 +94,7 @@ module.exports = [
       "curly": ["error", "multi-line", "consistent"],
       "dot-notation": "error",
       "eqeqeq": ["error", "smart"],
-      "no-alert": "warn",
+      "no-alert": "error",
       "no-array-constructor": "error",
       "no-caller": "error",
       "no-console": "warn",
@@ -98,7 +105,7 @@ module.exports = [
       "no-extra-bind": "error",
       "no-extra-label": "error",
       "no-implicit-coercion": "warn",
-      "no-implicit-globals": "warn",
+      "no-implicit-globals": "error",
       "no-implied-eval": "error",
       "no-invalid-this": "error",
       "no-iterator": "error",
@@ -112,11 +119,10 @@ module.exports = [
       "no-nested-ternary": "error",
       "no-new": "error",
       "no-new-func": "error",
-      "no-new-object": "error",
       "no-new-wrappers": "error",
+      "no-object-constructor": "error",
       "no-octal-escape": "error",
       "no-param-reassign": "error",
-      "no-process-env": "error",
       "no-proto": "error",
       "no-script-url": "error",
       "no-self-compare": "error",