From: Tom Hughes Date: Wed, 5 Feb 2025 18:26:32 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/5612' X-Git-Tag: live~195 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/4c3fb2c2b56fce7b31ce17d62fbed0c1b1195233?ds=sidebyside;hp=-c Merge remote-tracking branch 'upstream/pull/5612' --- 4c3fb2c2b56fce7b31ce17d62fbed0c1b1195233 diff --combined config/eslint.js index 7cbb9575f,c9ef72e3e..cb421a992 --- a/config/eslint.js +++ b/config/eslint.js @@@ -1,11 -1,9 +1,11 @@@ const globals = require("globals"); const js = require("@eslint/js"); +const erb = require("eslint-plugin-erb"); const stylisticJs = require("@stylistic/eslint-plugin-js"); module.exports = [ js.configs.recommended, + erb.configs.recommended, { plugins: { "@stylistic": stylisticJs @@@ -21,19 -19,11 +21,19 @@@ L: "readonly", OSM: "writable", Matomo: "readonly", - Qs: "readonly", Turbo: "readonly", updateLinks: "readonly" } }, + linterOptions: { + // The "unused disable directive" is set to "warn" by default. + // For the ERB plugin to work correctly, you must disable + // this directive to avoid issues described here + // https://github.com/eslint/eslint/discussions/18114 + // If you're using the CLI, you might also use the following flag: + // --report-unused-disable-directives-severity=off + reportUnusedDisableDirectives: "off" + }, rules: { "@stylistic/array-bracket-newline": ["error", "consistent"], "@stylistic/array-bracket-spacing": "error", @@@ -111,11 -101,10 +111,10 @@@ "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",