]> git.openstreetmap.org Git - rails.git/blobdiff - config/eslint.js
Merge remote-tracking branch 'upstream/pull/5651'
[rails.git] / config / eslint.js
index f21c87938eeaa995b415e003ce07cc0498abb031..c968d9e9a568efabe1539ac70af6a5e63901bdd0 100644 (file)
@@ -1,3 +1,5 @@
+/* eslint sort-keys: ["error", "asc", {minKeys: 5}] */
+
 const globals = require("globals");
 const js = require("@eslint/js");
 const erb = require("eslint-plugin-erb");
@@ -6,6 +8,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
@@ -19,8 +29,8 @@ module.exports = [
         Cookies: "readonly",
         I18n: "readonly",
         L: "readonly",
-        OSM: "writable",
         Matomo: "readonly",
+        OSM: "writable",
         Turbo: "readonly",
         updateLinks: "readonly"
       }
@@ -35,7 +45,6 @@ module.exports = [
       reportUnusedDisableDirectives: "off"
     },
     rules: {
-      /* eslint sort-keys: ["warn"] */
       "@stylistic/array-bracket-newline": ["error", "consistent"],
       "@stylistic/array-bracket-spacing": "error",
       "@stylistic/block-spacing": "error",