|
1 | 1 | { |
2 | | - "parser": "@typescript-eslint/parser", |
3 | | - "env": { |
4 | | - "browser": true, |
5 | | - "node": true |
6 | | - }, |
7 | | - "plugins": [ |
8 | | - "prettier", |
9 | | - "@typescript-eslint", |
10 | | - "jest", |
11 | | - "import" |
| 2 | + "parser": "@typescript-eslint/parser", |
| 3 | + "env": { |
| 4 | + "browser": true, |
| 5 | + "node": true |
| 6 | + }, |
| 7 | + "plugins": ["@typescript-eslint", "react", "react-hooks", "jest"], |
| 8 | + "extends": [ |
| 9 | + "plugin:@typescript-eslint/recommended", |
| 10 | + "plugin:import/recommended", |
| 11 | + "plugin:import/typescript", |
| 12 | + "plugin:jest/recommended", |
| 13 | + "plugin:prettier/recommended" |
| 14 | + ], |
| 15 | + "parserOptions": { |
| 16 | + "sourceType": "module", |
| 17 | + "ecmaVersion": 2018 |
| 18 | + }, |
| 19 | + "rules": { |
| 20 | + "react-hooks/rules-of-hooks": "error", |
| 21 | + "react-hooks/exhaustive-deps": "error", |
| 22 | + "@typescript-eslint/no-unused-vars": [ |
| 23 | + "error", |
| 24 | + { |
| 25 | + "ignoreRestSiblings": true, |
| 26 | + "varsIgnorePattern": "^[iI]gnored", |
| 27 | + "argsIgnorePattern": "^_", |
| 28 | + "caughtErrorsIgnorePattern": "^ignore" |
| 29 | + } |
12 | 30 | ], |
13 | | - "extends": [ |
14 | | - "prettier", |
15 | | - "plugin:prettier/recommended", |
16 | | - "plugin:@typescript-eslint/recommended", |
17 | | - "plugin:import/typescript", |
18 | | - "plugin:jest/recommended" |
| 31 | + "@typescript-eslint/member-delimiter-style": "off", |
| 32 | + "@typescript-eslint/explicit-function-return-type": "off", |
| 33 | + "@next/next/no-img-element": "off", |
| 34 | + "import/order": [ |
| 35 | + "error", |
| 36 | + { |
| 37 | + "groups": [ |
| 38 | + "builtin", |
| 39 | + "external", |
| 40 | + "unknown", |
| 41 | + "parent", |
| 42 | + "sibling", |
| 43 | + "index" |
| 44 | + ] |
| 45 | + } |
19 | 46 | ], |
20 | | - "parserOptions": { |
21 | | - "sourceType": "module", |
22 | | - "ecmaVersion": 2018 |
23 | | - }, |
24 | | - "rules": { |
25 | | - "import/namespace": "off", |
26 | | - "import/order": [ |
27 | | - "error" |
28 | | - ], |
29 | | - "no-unused-vars": "off", |
30 | | - "@typescript-eslint/no-unused-vars": "error", |
31 | | - "@typescript-eslint/member-delimiter-style": "off", |
32 | | - "@typescript-eslint/no-var-requires": "off", |
33 | | - "@typescript-eslint/no-extra-semi": "off", |
34 | | - "@typescript-eslint/no-explicit-any": "off" |
35 | | - } |
| 47 | + "no-console": [ |
| 48 | + "error", |
| 49 | + { |
| 50 | + "allow": ["warn", "error", "assert"] |
| 51 | + } |
| 52 | + ] |
| 53 | + } |
36 | 54 | } |
0 commit comments