|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "parser": "@typescript-eslint/parser", |
| 4 | + "parserOptions": { |
| 5 | + "ecmaVersion": 2020, |
| 6 | + "sourceType": "module" |
| 7 | + }, |
| 8 | + "plugins": ["@typescript-eslint", "prettier"], |
| 9 | + "extends": ["eslint:recommended", "prettier"], |
| 10 | + "rules": { |
| 11 | + // TypeScript specific rules |
| 12 | + "@typescript-eslint/no-unused-vars": "error", |
| 13 | + "@typescript-eslint/no-explicit-any": "error", |
| 14 | + "@typescript-eslint/explicit-function-return-type": "warn", |
| 15 | + "@typescript-eslint/explicit-module-boundary-types": "warn", |
| 16 | + "@typescript-eslint/no-inferrable-types": "off", |
| 17 | + "@typescript-eslint/no-non-null-assertion": "warn", |
| 18 | + |
| 19 | + // General ESLint rules |
| 20 | + "no-console": "warn", |
| 21 | + "no-debugger": "error", |
| 22 | + "no-duplicate-imports": "error", |
| 23 | + "no-unused-expressions": "error", |
| 24 | + "prefer-const": "error", |
| 25 | + "prefer-template": "error", |
| 26 | + "eqeqeq": ["error", "always"], |
| 27 | + "curly": ["error", "all"], |
| 28 | + |
| 29 | + // Prettier integration |
| 30 | + "prettier/prettier": "error" |
| 31 | + }, |
| 32 | + "env": { |
| 33 | + "node": true, |
| 34 | + "es2020": true |
| 35 | + }, |
| 36 | + "overrides": [ |
| 37 | + { |
| 38 | + "files": ["tests/**/*.ts", "**/*.test.ts", "**/*.spec.ts"], |
| 39 | + "env": { |
| 40 | + "jest": true |
| 41 | + }, |
| 42 | + "rules": { |
| 43 | + "@typescript-eslint/no-explicit-any": "off", |
| 44 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 45 | + "no-console": "off" |
| 46 | + } |
| 47 | + }, |
| 48 | + { |
| 49 | + "files": ["*.js", "*.mjs"], |
| 50 | + "rules": { |
| 51 | + "@typescript-eslint/explicit-function-return-type": "off" |
| 52 | + } |
| 53 | + } |
| 54 | + ] |
| 55 | +} |
0 commit comments