|
| 1 | +import eslint from "@eslint/js"; |
| 2 | +import tseslint from "typescript-eslint"; |
| 3 | +import eslintConfigPrettier from "eslint-config-prettier/flat"; |
| 4 | + |
| 5 | +export default tseslint.config( |
| 6 | + { |
| 7 | + ignores: ["dist/", "node_modules/"], |
| 8 | + }, |
| 9 | + eslint.configs.recommended, |
| 10 | + ...tseslint.configs.recommended, |
| 11 | + eslintConfigPrettier, |
| 12 | + { |
| 13 | + rules: { |
| 14 | + "no-shadow": "off", |
| 15 | + "@typescript-eslint/no-shadow": "off", |
| 16 | + "@typescript-eslint/naming-convention": "off", |
| 17 | + "no-bitwise": "off", |
| 18 | + "max-classes-per-file": "off", |
| 19 | + "no-console": "off", |
| 20 | + "@typescript-eslint/no-explicit-any": "off", |
| 21 | + "no-case-declarations": "off", |
| 22 | + "no-useless-escape": "off", |
| 23 | + "no-prototype-builtins": "off", |
| 24 | + "@typescript-eslint/no-require-imports": "off", |
| 25 | + "@typescript-eslint/no-namespace": "off", |
| 26 | + "no-control-regex": "off", |
| 27 | + // New in ESLint v10 recommended — not part of the pre-migration rule set |
| 28 | + "preserve-caught-error": "off", |
| 29 | + "no-useless-assignment": "off", |
| 30 | + |
| 31 | + // New in typescript-eslint v8 recommended — not part of the pre-migration rule set |
| 32 | + "@typescript-eslint/no-empty-object-type": "off", |
| 33 | + "@typescript-eslint/no-unused-expressions": "off", |
| 34 | + |
| 35 | + "@typescript-eslint/no-unused-vars": [ |
| 36 | + "error", |
| 37 | + { |
| 38 | + argsIgnorePattern: "^_", |
| 39 | + varsIgnorePattern: "^_", |
| 40 | + // v8 changed the default from "none" to "all"; restore old behaviour |
| 41 | + caughtErrors: "none", |
| 42 | + }, |
| 43 | + ], |
| 44 | + }, |
| 45 | + }, |
| 46 | +); |
0 commit comments