2024-09-28 21:45:45 +02:00
|
|
|
import globals from "globals";
|
|
|
|
import js from "@eslint/js";
|
2024-09-29 11:45:42 +02:00
|
|
|
import stylisticJs from "@stylistic/eslint-plugin-js";
|
2024-09-28 21:45:45 +02:00
|
|
|
|
|
|
|
export default [
|
|
|
|
{
|
2024-09-28 21:49:13 +02:00
|
|
|
ignores: ["dist/"],
|
2024-09-28 21:57:35 +02:00
|
|
|
},
|
|
|
|
js.configs.recommended,
|
|
|
|
{
|
2024-09-28 21:45:45 +02:00
|
|
|
languageOptions: {
|
|
|
|
globals: {
|
|
|
|
...globals.browser,
|
|
|
|
"process": "readonly",
|
|
|
|
},
|
|
|
|
},
|
2024-09-29 11:45:42 +02:00
|
|
|
plugins: { "@stylistic/js": stylisticJs },
|
2024-09-28 21:45:45 +02:00
|
|
|
rules: {
|
|
|
|
"no-case-declarations": "off",
|
|
|
|
"no-unused-vars": ["error", {
|
|
|
|
args: "none",
|
|
|
|
caughtErrorsIgnorePattern: "^_",
|
|
|
|
destructuredArrayIgnorePattern: "^_",
|
|
|
|
}],
|
2024-09-28 22:07:39 +02:00
|
|
|
"no-var": "error",
|
2025-01-20 23:02:23 +01:00
|
|
|
"no-eval": "error",
|
|
|
|
"no-implied-eval": "error",
|
2024-10-14 00:56:18 +02:00
|
|
|
"eqeqeq": "error",
|
2024-11-15 02:18:59 +01:00
|
|
|
"no-invalid-this": "error",
|
2025-01-20 23:02:23 +01:00
|
|
|
"no-extend-native": "error",
|
2024-11-15 02:18:59 +01:00
|
|
|
"prefer-arrow-callback": "error",
|
2025-01-20 23:02:23 +01:00
|
|
|
"no-implicit-globals": "error",
|
|
|
|
"no-throw-literal": "error",
|
2024-11-16 12:17:23 +01:00
|
|
|
"no-implicit-coercion": "warn",
|
2024-11-16 12:28:17 +01:00
|
|
|
"object-shorthand": "warn",
|
2025-01-20 23:02:23 +01:00
|
|
|
"curly": "warn",
|
2025-01-27 16:29:58 +00:00
|
|
|
"camelcase": "warn",
|
2024-09-29 11:45:42 +02:00
|
|
|
"@stylistic/js/indent": ["warn", "tab"],
|
|
|
|
"@stylistic/js/quotes": ["warn", "double"],
|
2024-09-29 11:48:45 +02:00
|
|
|
"@stylistic/js/semi": "warn",
|
2025-02-20 17:43:17 +01:00
|
|
|
"@stylistic/js/brace-style": ["warn", "1tbs"],
|
2024-09-29 11:50:57 +02:00
|
|
|
"@stylistic/js/comma-dangle": ["warn", "always-multiline"],
|
2024-09-29 11:54:21 +02:00
|
|
|
"@stylistic/js/arrow-parens": "warn",
|
2025-02-20 17:56:19 +01:00
|
|
|
"@stylistic/js/arrow-spacing": "warn",
|
2025-02-20 17:57:08 +01:00
|
|
|
"@stylistic/js/block-spacing": "warn",
|
2025-02-20 17:42:19 +01:00
|
|
|
"@stylistic/js/object-curly-spacing": ["warn", "always"],
|
2025-02-20 17:47:52 +01:00
|
|
|
"@stylistic/js/object-curly-newline": ["warn", {
|
|
|
|
multiline: true,
|
|
|
|
consistent: true,
|
|
|
|
}],
|
2025-02-20 17:51:46 +01:00
|
|
|
"@stylistic/js/array-bracket-spacing": ["warn", "never"],
|
2025-02-20 17:50:35 +01:00
|
|
|
"@stylistic/js/array-bracket-newline": ["warn", "consistent"],
|
2024-09-28 21:45:45 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|