|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "parser": "@typescript-eslint/parser", |
| 4 | + "parserOptions": { |
| 5 | + "project": "./tsconfig.json" |
| 6 | + }, |
| 7 | + "env": { |
| 8 | + "browser": true, |
| 9 | + "es2021": true, |
| 10 | + "jest": true |
| 11 | + }, |
| 12 | + "plugins": [ |
| 13 | + "@typescript-eslint", |
| 14 | + "react-hooks", |
| 15 | + "jest", |
| 16 | + "jest-dom", |
| 17 | + "testing-library" |
| 18 | + ], |
| 19 | + "extends": [ |
| 20 | + "eslint:recommended", |
| 21 | + "plugin:@typescript-eslint/eslint-recommended", |
| 22 | + "plugin:@typescript-eslint/recommended", |
| 23 | + "plugin:react-hooks/recommended", |
| 24 | + "plugin:jest-dom/recommended", |
| 25 | + "plugin:testing-library/react", |
| 26 | + "plugin:jest/recommended" |
| 27 | + ], |
| 28 | + "rules": { |
| 29 | + "no-console": "warn", |
| 30 | + "no-return-await": "error", |
| 31 | + "no-empty-function": "error", |
| 32 | + "@typescript-eslint/no-unused-vars": "warn", |
| 33 | + "@typescript-eslint/array-type": "error", |
| 34 | + "@typescript-eslint/no-explicit-any": [ |
| 35 | + "error", |
| 36 | + { |
| 37 | + "ignoreRestArgs": true |
| 38 | + } |
| 39 | + ], |
| 40 | + "@typescript-eslint/explicit-function-return-type": [ |
| 41 | + "error", |
| 42 | + { "allowHigherOrderFunctions": true } |
| 43 | + ], |
| 44 | + "@typescript-eslint/typedef": [ |
| 45 | + "error", |
| 46 | + { |
| 47 | + "parameter": true, |
| 48 | + "propertyDeclaration": true |
| 49 | + } |
| 50 | + ], |
| 51 | + "@typescript-eslint/consistent-indexed-object-style": ["error", "record"], |
| 52 | + "@typescript-eslint/naming-convention": [ |
| 53 | + "error", |
| 54 | + { |
| 55 | + "selector": "variable", |
| 56 | + "format": ["camelCase", "PascalCase"], |
| 57 | + "types": ["function"] |
| 58 | + }, |
| 59 | + { |
| 60 | + "selector": "variable", |
| 61 | + "format": ["camelCase", "UPPER_CASE"], |
| 62 | + "types": ["string", "number", "boolean", "array"] |
| 63 | + }, |
| 64 | + { |
| 65 | + "selector": "function", |
| 66 | + "format": ["camelCase"] |
| 67 | + }, |
| 68 | + { |
| 69 | + "selector": ["typeLike"], |
| 70 | + "format": ["PascalCase"] |
| 71 | + }, |
| 72 | + { |
| 73 | + "selector": "interface", |
| 74 | + "format": ["PascalCase"], |
| 75 | + "prefix": ["I"] |
| 76 | + } |
| 77 | + ] |
| 78 | + } |
| 79 | +} |
0 commit comments