|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + parser: "@typescript-eslint/parser", |
| 4 | + env: { |
| 5 | + node: true, |
| 6 | + browser: true |
| 7 | + }, |
| 8 | + plugins: [ |
| 9 | + "@typescript-eslint" |
| 10 | + ], |
| 11 | + extends: [ |
| 12 | + "eslint:recommended", |
| 13 | + "plugin:@typescript-eslint/eslint-recommended", |
| 14 | + "plugin:@typescript-eslint/recommended", |
| 15 | + // NOTE: `project: "./tsconfig.json"` does not work well together with svelte override plugin (TS parser singleton and yadayada) |
| 16 | + // If svelte file checking is desired, comment project variables in parserOptions (and deprecation plugin) |
| 17 | + // "plugin:deprecation/recommended", |
| 18 | + "plugin:svelte/recommended" |
| 19 | + ], |
| 20 | + parserOptions: { |
| 21 | + sourceType: "module", |
| 22 | + // project: "./tsconfig.json", |
| 23 | + extraFileExtensions: [".svelte"], |
| 24 | + }, |
| 25 | + rules: { |
| 26 | + "no-unused-vars": "off", |
| 27 | + "@typescript-eslint/no-unused-vars": [ |
| 28 | + "error", |
| 29 | + {"args": "none"} |
| 30 | + ], |
| 31 | + "@typescript-eslint/no-explicit-any": [ |
| 32 | + "error", |
| 33 | + {"ignoreRestArgs": true} |
| 34 | + ], |
| 35 | + "@typescript-eslint/ban-ts-comment": "off", |
| 36 | + "no-prototype-builtins": "off", |
| 37 | + "@typescript-eslint/no-empty-function": "off", |
| 38 | + // Ignore A11y rules |
| 39 | + "svelte/valid-compile": "off", |
| 40 | + }, |
| 41 | + overrides: [ |
| 42 | + { |
| 43 | + files: ["*.svelte"], |
| 44 | + parser: "svelte-eslint-parser", |
| 45 | + parserOptions: { |
| 46 | + // project: "./tsconfig.json", |
| 47 | + parser: "@typescript-eslint/parser", |
| 48 | + } |
| 49 | + } |
| 50 | + ], |
| 51 | + ignorePatterns: [ |
| 52 | + "**/*.js", |
| 53 | + // "**/*.svelte", |
| 54 | + ] |
| 55 | +} |
0 commit comments