|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + parser: "@typescript-eslint/parser", |
| 4 | + parserOptions: { |
| 5 | + ecmaVersion: "latest", |
| 6 | + jsxPragma: "null", |
| 7 | + project: "./tsconfig.json", |
| 8 | + tsconfigRootDir: __dirname, |
| 9 | + extraFileExtensions: [], |
| 10 | + }, |
| 11 | + ignorePatterns: ["**/lib", "**/dist", "**/*.json"], |
| 12 | + extends: [ |
| 13 | + "react-app", // provides @typescript-eslint DO NOT added it twice |
| 14 | + "react-app/jest", |
| 15 | + "plugin:jsx-a11y/recommended", |
| 16 | + "prettier", |
| 17 | + ], |
| 18 | + // @see https://eslint.org/docs/latest/user-guide/configuring/rules |
| 19 | + // @see https://typescript-eslint.io/rules/some-rule-name-here |
| 20 | + // 0 off |
| 21 | + // 1 warn |
| 22 | + // 2 error |
| 23 | + rules: { |
| 24 | + // use what makes sense |
| 25 | + "@typescript-eslint/prefer-nullish-coalescing": 0, |
| 26 | + // force error |
| 27 | + "@typescript-eslint/restrict-template-expressions": 2, |
| 28 | + // too many false positives/TSC does it better |
| 29 | + "@typescript-eslint/await-thenable": 0, |
| 30 | + "@typescript-eslint/ban-ts-comment": 0, |
| 31 | + "@typescript-eslint/no-empty-interface": 0, |
| 32 | + "@typescript-eslint/no-explicit-any": 0, |
| 33 | + "@typescript-eslint/no-non-null-assertion": 0, |
| 34 | + "@typescript-eslint/no-unnecessary-condition": 0, |
| 35 | + "@typescript-eslint/no-unnecessary-type-assertion": 0, |
| 36 | + "@typescript-eslint/no-unsafe-argument": 1, |
| 37 | + "@typescript-eslint/no-unsafe-assignment": 0, |
| 38 | + "@typescript-eslint/no-unsafe-call": 0, |
| 39 | + "@typescript-eslint/no-unsafe-member-access": 0, |
| 40 | + "@typescript-eslint/no-unsafe-return": 0, |
| 41 | + }, |
| 42 | +}; |
0 commit comments