|
| 1 | +import js from "npm:@eslint/js@9"; |
| 2 | +import globals from "npm:globals@15"; |
| 3 | + |
| 4 | +export default [ |
| 5 | + js.configs.recommended, |
| 6 | + { |
| 7 | + languageOptions: { |
| 8 | + ecmaVersion: 2022, |
| 9 | + }, |
| 10 | + rules: { |
| 11 | + "arrow-parens": ["error", "as-needed"], |
| 12 | + "arrow-spacing": ["error", { before: true, after: true }], |
| 13 | + "block-scoped-var": "error", |
| 14 | + "brace-style": ["error", "1tbs", { allowSingleLine: false }], |
| 15 | + "comma-dangle": ["error", "always-multiline"], |
| 16 | + "comma-style": ["error", "last"], |
| 17 | + "eol-last": ["error", "always"], |
| 18 | + "eqeqeq": "error", |
| 19 | + "func-call-spacing": ["error", "never"], |
| 20 | + "guard-for-in": "error", |
| 21 | + "key-spacing": ["error", { beforeColon: false, afterColon: true, mode: "strict" }], |
| 22 | + "keyword-spacing": ["error", { before: true, after: true }], |
| 23 | + "linebreak-style": ["error", "unix"], |
| 24 | + "max-len": ["error", { code: 100, tabWidth: 4 }], |
| 25 | + "no-alert": "error", |
| 26 | + "no-confusing-arrow": "error", |
| 27 | + "no-const-assign": "error", |
| 28 | + "no-debugger": "error", |
| 29 | + "no-div-regex": "error", |
| 30 | + "no-dupe-args": "error", |
| 31 | + "no-dupe-else-if": "error", |
| 32 | + "no-dupe-keys": "error", |
| 33 | + "no-duplicate-case": "error", |
| 34 | + "no-ex-assign": "error", |
| 35 | + "no-fallthrough": "error", |
| 36 | + "no-floating-decimal": "error", |
| 37 | + "no-implicit-globals": "error", |
| 38 | + "no-implied-eval": "error", |
| 39 | + "no-import-assign": "error", |
| 40 | + "no-invalid-regexp": "error", |
| 41 | + "no-label-var": "error", |
| 42 | + "no-lonely-if": "error", |
| 43 | + "no-mixed-operators": "error", |
| 44 | + "no-multi-assign": "error", |
| 45 | + "no-return-assign": "error", |
| 46 | + "no-script-url": "error", |
| 47 | + "no-self-compare": "error", |
| 48 | + "no-sequences": "error", |
| 49 | + "no-template-curly-in-string": "error", |
| 50 | + "no-trailing-spaces": "error", |
| 51 | + "no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }], |
| 52 | + "no-var": ["error"], |
| 53 | + "prefer-arrow-callback": ["error"], |
| 54 | + "prefer-const": ["error"], |
| 55 | + "quotes": ["error", "double"], |
| 56 | + "semi": ["error", "always"], |
| 57 | + "space-before-blocks": "error", |
| 58 | + "space-before-function-paren": ["error", "never"], |
| 59 | + "space-infix-ops": "error", |
| 60 | + }, |
| 61 | + }, |
| 62 | + { |
| 63 | + files: ["static/**/*", "templates/**/*"], |
| 64 | + languageOptions: { |
| 65 | + globals: globals.browser, |
| 66 | + }, |
| 67 | + }, |
| 68 | + { |
| 69 | + files: ["gui-tests/**/*"], |
| 70 | + languageOptions: { |
| 71 | + globals: globals.node, |
| 72 | + }, |
| 73 | + }, |
| 74 | +]; |
0 commit comments