|
1 | 1 | { |
2 | | - "env": { |
3 | | - "jest/globals": true |
| 2 | + "parserOptions": { |
| 3 | + "ecmaVersion": 2022, |
| 4 | + "sourceType": "module", |
| 5 | + "ecmaFeatures": { |
| 6 | + "jsx": true |
| 7 | + } |
4 | 8 | }, |
5 | | - "extends": ["airbnb","react-app", "plugin:jest-dom/recommended", "plugin:testing-library/react"], |
| 9 | + "extends": [ |
| 10 | + "airbnb", |
| 11 | + "plugin:react/recommended", |
| 12 | + "plugin:react-hooks/recommended", |
| 13 | + "plugin:testing-library/react" |
| 14 | + ], |
6 | 15 | "globals": { |
7 | 16 | "page": true, |
8 | 17 | "document": true, |
9 | | - "vi": true, |
| 18 | + "vi": true |
10 | 19 | }, |
11 | | - "plugins": ["jest", "jest-dom", "react", "react-hooks", "testing-library"], |
| 20 | + "plugins": [ |
| 21 | + "react", |
| 22 | + "react-hooks", |
| 23 | + "testing-library" |
| 24 | + ], |
12 | 25 | "rules": { |
13 | 26 | "import/no-unresolved": [ |
14 | 27 | 2, { "ignore": ["test-utils"] } |
15 | 28 | ], |
16 | 29 | "import/prefer-default-export": "off", |
17 | 30 | "no-console": "off", |
| 31 | + "no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }], |
| 32 | + "no-unused-vars": "off", |
| 33 | + "no-undef": "off", |
| 34 | + "no-restricted-syntax": ["warn", "WithStatement"], |
| 35 | + "no-restricted-globals": ["error"], |
| 36 | + "eqeqeq": ["warn", "smart"], |
| 37 | + "no-use-before-define": [ |
| 38 | + "warn", |
| 39 | + { |
| 40 | + "functions": false, |
| 41 | + "classes": false, |
| 42 | + "variables": false |
| 43 | + }, |
| 44 | + ], |
| 45 | + "no-mixed-operators": [ |
| 46 | + "warn", |
| 47 | + { |
| 48 | + "groups": [ |
| 49 | + ["&", "|", "^", "~", "<<", ">>", ">>>"], |
| 50 | + ["==", "!=", "===", "!==", ">", ">=", "<", "<="], |
| 51 | + ["&&", "||"], |
| 52 | + ["in", "instanceof"], |
| 53 | + ], |
| 54 | + "allowSamePrecedence": false, |
| 55 | + }, |
| 56 | + ], |
18 | 57 | "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], |
19 | 58 | "require-jsdoc": ["error", { |
20 | 59 | "require": { |
|
0 commit comments