|
| 1 | +import js from "@eslint/js" |
| 2 | + |
| 3 | +export default [ |
| 4 | + { |
| 5 | + ignores: ["dist/**", "app/**", "node_modules/**", "pkg/**", "test/**", "lib/**", "bin/**", "config/**", "docs/**"] |
| 6 | + }, |
| 7 | + js.configs.recommended, |
| 8 | + { |
| 9 | + files: ["src/**/*.js"], |
| 10 | + languageOptions: { |
| 11 | + ecmaVersion: 2022, |
| 12 | + sourceType: "module", |
| 13 | + globals: { |
| 14 | + console: "readonly", |
| 15 | + document: "readonly", |
| 16 | + window: "readonly", |
| 17 | + navigator: "readonly", |
| 18 | + HTMLElement: "readonly", |
| 19 | + CustomEvent: "readonly", |
| 20 | + Element: "readonly", |
| 21 | + Node: "readonly", |
| 22 | + NodeList: "readonly", |
| 23 | + Event: "readonly", |
| 24 | + MutationObserver: "readonly", |
| 25 | + DOMParser: "readonly", |
| 26 | + Blob: "readonly", |
| 27 | + File: "readonly", |
| 28 | + FileReader: "readonly", |
| 29 | + URL: "readonly", |
| 30 | + URLSearchParams: "readonly", |
| 31 | + Request: "readonly", |
| 32 | + Response: "readonly", |
| 33 | + FormData: "readonly", |
| 34 | + fetch: "readonly", |
| 35 | + setTimeout: "readonly", |
| 36 | + clearTimeout: "readonly", |
| 37 | + setInterval: "readonly", |
| 38 | + clearInterval: "readonly", |
| 39 | + XMLHttpRequest: "readonly", |
| 40 | + requestAnimationFrame: "readonly", |
| 41 | + cancelAnimationFrame: "readonly", |
| 42 | + customElements: "readonly", |
| 43 | + Prism: "readonly" |
| 44 | + } |
| 45 | + }, |
| 46 | + rules: { |
| 47 | + "array-bracket-spacing": ["error", "always"], |
| 48 | + "block-spacing": ["error", "always"], |
| 49 | + "camelcase": ["error"], |
| 50 | + "comma-spacing": ["error"], |
| 51 | + "curly": ["error", "multi-line"], |
| 52 | + "dot-notation": ["error"], |
| 53 | + "eol-last": ["error"], |
| 54 | + "func-style": ["error", "declaration"], |
| 55 | + "getter-return": ["error"], |
| 56 | + "keyword-spacing": ["error"], |
| 57 | + "no-empty": "off", |
| 58 | + "no-extra-parens": ["error"], |
| 59 | + "no-multi-spaces": ["error", { "exceptions": { "VariableDeclarator": true } }], |
| 60 | + "no-multiple-empty-lines": ["error", { "max": 2 }], |
| 61 | + "no-restricted-globals": ["error", "event"], |
| 62 | + "no-trailing-spaces": ["error"], |
| 63 | + "no-unused-vars": ["error", { "vars": "all", "args": "none", "caughtErrors": "none" }], |
| 64 | + "no-var": ["error"], |
| 65 | + "object-curly-spacing": ["error", "always"], |
| 66 | + "prefer-const": ["error"], |
| 67 | + "quotes": ["error", "double"], |
| 68 | + "semi": ["error", "never"], |
| 69 | + "sort-imports": ["error", { "ignoreDeclarationSort": true }] |
| 70 | + } |
| 71 | + } |
| 72 | +] |
0 commit comments