|
1 | 1 | {
|
2 | 2 | "parser": "@typescript-eslint/parser",
|
3 |
| - "extends": [ |
4 |
| - "plugin:@typescript-eslint/recommended", |
5 |
| - "airbnb" |
6 |
| - ], |
7 |
| - "plugins": ["@typescript-eslint"], |
| 3 | + "parserOptions": { |
| 4 | + "ecmaFeatures": { |
| 5 | + "jsx": true |
| 6 | + }, |
| 7 | + "sourceType": "module", |
| 8 | + "useJSXTextNode": true |
| 9 | + }, |
| 10 | + "extends": ["airbnb", "airbnb/hooks", "plugin:@typescript-eslint/recommended", "prettier"], |
| 11 | + "plugins": ["prettier", "@typescript-eslint"], |
8 | 12 | "settings": {
|
9 | 13 | "import/resolver": {
|
10 | 14 | "node": {
|
11 |
| - "extensions": [ |
12 |
| - ".js", |
13 |
| - ".jsx", |
14 |
| - ".ts", |
15 |
| - ".tsx" |
16 |
| - ] |
| 15 | + "extensions": [".js", ".jsx", ".ts", ".tsx"] |
17 | 16 | }
|
18 | 17 | }
|
19 | 18 | },
|
20 | 19 | "rules": {
|
| 20 | + "prettier/prettier": ["error"], |
21 | 21 | "class-methods-use-this": "off",
|
22 | 22 | "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
|
23 |
| - "import/extensions": ["error", "ignorePackages", { |
24 |
| - "js": "never", |
25 |
| - "mjs": "never", |
26 |
| - "jsx": "never", |
27 |
| - "ts": "never", |
28 |
| - "tsx": "never" |
29 |
| - }], |
30 |
| - "import/no-extraneous-dependencies": ["error", { "devDependencies": true, "peerDependencies": true }], |
| 23 | + "no-use-before-define": "off", |
| 24 | + "no-unused-expressions": "off", |
| 25 | + "import/extensions": [ |
| 26 | + "error", |
| 27 | + "ignorePackages", |
| 28 | + { |
| 29 | + "js": "never", |
| 30 | + "mjs": "never", |
| 31 | + "jsx": "never", |
| 32 | + "ts": "never", |
| 33 | + "tsx": "never" |
| 34 | + } |
| 35 | + ], |
| 36 | + "import/prefer-default-export": "off", |
31 | 37 | "react/jsx-filename-extension": ["error", { "extensions": [".jsx", ".tsx"] }],
|
32 |
| - "react/require-default-props": "off", |
33 |
| - "react/static-property-placement": ["error", "static public field"], |
34 |
| - "@typescript-eslint/explicit-function-return-type": "off", |
| 38 | + "react/jsx-one-expression-per-line": "off", |
| 39 | + "react/jsx-props-no-spreading": "off", |
| 40 | + "@typescript-eslint/camelcase": "off", |
| 41 | + "@typescript-eslint/indent": "off", |
| 42 | + "@typescript-eslint/no-explicit-any": "off", |
35 | 43 | "@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }]
|
36 | 44 | },
|
37 | 45 | "overrides": [
|
38 | 46 | {
|
39 |
| - "files": ["*.test.ts", "*.test.tsx"], |
40 |
| - "env": { "jest": true, "node": true } |
| 47 | + "files": ["*.ts", "*.tsx"], |
| 48 | + "rules": { |
| 49 | + "react/prop-types": "off", |
| 50 | + "react/require-default-props": "off" |
| 51 | + } |
| 52 | + }, |
| 53 | + { |
| 54 | + "files": ["test/**/*.*", "*.test.*", "**/__mocks__/**/*.*"], |
| 55 | + "env": { |
| 56 | + "jest": true |
| 57 | + }, |
| 58 | + "rules": { |
| 59 | + "no-underscore-dangle": "off", |
| 60 | + "no-unused-expressions": "off", |
| 61 | + "no-unused-vars": "off", |
| 62 | + "import/no-extraneous-dependencies": "off", |
| 63 | + "@typescript-eslint/ban-ts-ignore": "off", |
| 64 | + "@typescript-eslint/no-empty-function": "off", |
| 65 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 66 | + "@typescript-eslint/no-unused-vars": "off" |
| 67 | + } |
41 | 68 | }
|
42 | 69 | ]
|
43 | 70 | }
|
0 commit comments