+/* eslint sort-keys: ["error", "asc", {minKeys: 5}] */
+
const globals = require("globals");
const js = require("@eslint/js");
const erb = require("eslint-plugin-erb");
module.exports = [
js.configs.recommended,
erb.configs.recommended,
+ {
+ ignores: [
+ "app/assets/javascripts/i18n/",
+ "coverage/assets/",
+ "public/assets/",
+ "vendor/"
+ ]
+ },
{
plugins: {
"@stylistic": stylisticJs
Cookies: "readonly",
I18n: "readonly",
L: "readonly",
- OSM: "writable",
Matomo: "readonly",
+ OSM: "writable",
Turbo: "readonly",
updateLinks: "readonly"
}
reportUnusedDisableDirectives: "off"
},
rules: {
- /* eslint sort-keys: ["warn"] */
"@stylistic/array-bracket-newline": ["error", "consistent"],
"@stylistic/array-bracket-spacing": "error",
"@stylistic/block-spacing": "error",
}],
"@stylistic/key-spacing": "error",
"@stylistic/keyword-spacing": "error",
+ "@stylistic/max-statements-per-line": "error",
"@stylistic/no-floating-decimal": "error",
"@stylistic/no-mixed-operators": "error",
"@stylistic/no-multi-spaces": "error",
"@stylistic/object-curly-newline": ["error", { consistent: true }],
"@stylistic/object-curly-spacing": ["error", "always"],
"@stylistic/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
+ "@stylistic/one-var-declaration-per-line": "error",
"@stylistic/operator-linebreak": ["error", "after"],
"@stylistic/padded-blocks": ["error", "never"],
"@stylistic/quote-props": ["error", "consistent-as-needed", { keywords: true, numbers: true }],
"no-caller": "error",
"no-console": "warn",
"no-div-regex": "error",
+ "no-else-return": ["error", { allowElseIf: false }],
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-useless-return": "error",
"no-void": "error",
"no-warning-comments": "warn",
+ "operator-assignment": "error",
+ "prefer-object-spread": "error",
"radix": ["error", "always"],
"yoda": "error"
}