|
| 1 | +{ |
| 2 | + "parser": "@typescript-eslint/parser", |
| 3 | + "plugins": ["@typescript-eslint", "simple-import-sort"], |
| 4 | + "extends": [ |
| 5 | + "plugin:@typescript-eslint/recommended", |
| 6 | + "plugin:prettier/recommended" |
| 7 | + ], |
| 8 | + "parserOptions": { |
| 9 | + "ecmaVersion": 2020, |
| 10 | + "sourceType": "module", |
| 11 | + "ecmaFeatures": { |
| 12 | + "jsx": true |
| 13 | + } |
| 14 | + }, |
| 15 | + "rules": { |
| 16 | + "curly": "error", |
| 17 | + "no-extra-boolean-cast": "error", |
| 18 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 19 | + "@typescript-eslint/no-empty-function": "off", |
| 20 | + "@typescript-eslint/ban-ts-comment": "warn", |
| 21 | + "@typescript-eslint/ban-types": "off", |
| 22 | + "@typescript-eslint/no-explicit-any": "off", |
| 23 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 24 | + "@typescript-eslint/no-object-literal-type-assertion": "off", |
| 25 | + "@typescript-eslint/no-unused-vars": [ |
| 26 | + "warn", |
| 27 | + { "ignoreRestSiblings": true } |
| 28 | + ], |
| 29 | + "no-console": ["error"], |
| 30 | + "simple-import-sort/imports": [ |
| 31 | + "error", |
| 32 | + { |
| 33 | + "groups": [ |
| 34 | + // Side effect imports. |
| 35 | + ["^\\u0000"], |
| 36 | + // Parent imports. Put `..` last. |
| 37 | + ["^\\.\\.(?!/?$)", "^\\.\\./?$"], |
| 38 | + // Other relative imports. Put same-folder imports and `.` last. |
| 39 | + ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"] |
| 40 | + ] |
| 41 | + } |
| 42 | + ], |
| 43 | + "simple-import-sort/exports": "error" |
| 44 | + }, |
| 45 | + "overrides": [ |
| 46 | + { |
| 47 | + "files": ["*.test.ts", "*.test.tsx"], |
| 48 | + "rules": { |
| 49 | + // Allow testing runtime errors to suppress TS errors |
| 50 | + "@typescript-eslint/ban-ts-comment": "off" |
| 51 | + } |
| 52 | + } |
| 53 | + ] |
| 54 | +} |
0 commit comments