|
1 | 1 | { |
2 | | - "root": true, |
3 | | - "env": { |
4 | | - "browser": true, |
5 | | - "es2021": true |
| 2 | + "root": true, |
| 3 | + "env": { |
| 4 | + "browser": true, |
| 5 | + "es2021": true |
| 6 | + }, |
| 7 | + "extends": [ |
| 8 | + "prettier", |
| 9 | + "plugin:react/jsx-runtime", |
| 10 | + "plugin:jsx-a11y/recommended", |
| 11 | + "plugin:react-hooks/recommended", |
| 12 | + "eslint:recommended", |
| 13 | + "plugin:react/recommended" |
| 14 | + ], |
| 15 | + "settings": { |
| 16 | + "react": { |
| 17 | + "createClass": "createReactClass", // Regex for Component Factory to use, |
| 18 | + // default to "createReactClass" |
| 19 | + "pragma": "React", // Pragma to use, default to "React" |
| 20 | + "fragment": "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment" |
| 21 | + "version": "detect", // React version. "detect" automatically picks the version you have installed. |
| 22 | + // You can also use `16.0`, `16.3`, etc, if you want to override the detected value. |
| 23 | + // It will default to "latest" and warn if missing, and to "detect" in the future |
| 24 | + "flowVersion": "0.53" // Flow version |
6 | 25 | }, |
7 | | - "extends": ["prettier", "plugin:react/jsx-runtime", "plugin:jsx-a11y/recommended", "plugin:react-hooks/recommended"], |
8 | | - "settings": { |
9 | | - "import/resolver": { |
10 | | - "node": { |
11 | | - "moduleDirectory": ["node_modules", "src/"] |
12 | | - } |
13 | | - } |
14 | | - }, |
15 | | - "parser": "@babel/eslint-parser", |
16 | | - "parserOptions": { |
17 | | - "ecmaFeatures": { |
18 | | - "experimentalObjectRestSpread": true, |
19 | | - "impliedStrict": true |
20 | | - }, |
21 | | - "ecmaVersion": 12 |
22 | | - }, |
23 | | - "plugins": ["prettier", "react", "react-hooks"], |
24 | | - "rules": { |
25 | | - "react/jsx-filename-extension": 0, |
26 | | - "no-param-reassign": 0, |
27 | | - "react/prop-types": 1, |
28 | | - "react/require-default-props": 0, |
29 | | - "react/no-array-index-key": 0, |
30 | | - "react/jsx-props-no-spreading": 0, |
31 | | - "react/forbid-prop-types": 0, |
32 | | - "import/order": 0, |
33 | | - "no-console": 0, |
34 | | - "jsx-a11y/anchor-is-valid": 0, |
35 | | - "prefer-destructuring": 0, |
36 | | - "no-shadow": 0, |
37 | | - "no-unused-vars": [ |
38 | | - 1, |
39 | | - { |
40 | | - "ignoreRestSiblings": false |
41 | | - } |
42 | | - ], |
43 | | - "prettier/prettier": [ |
44 | | - 2, |
45 | | - { |
46 | | - "bracketSpacing": true, |
47 | | - "printWidth": 140, |
48 | | - "singleQuote": true, |
49 | | - "trailingComma": "none", |
50 | | - "tabWidth": 4, |
51 | | - "useTabs": false, |
52 | | - "endOfLine": "auto" |
53 | | - } |
54 | | - ] |
| 26 | + "import/resolver": { |
| 27 | + "node": { |
| 28 | + "moduleDirectory": ["node_modules", "src/"] |
| 29 | + } |
55 | 30 | } |
| 31 | + }, |
| 32 | + "parser": "@babel/eslint-parser", |
| 33 | + "parserOptions": { |
| 34 | + "ecmaFeatures": { |
| 35 | + "experimentalObjectRestSpread": true, |
| 36 | + "impliedStrict": true, |
| 37 | + "jsx": true |
| 38 | + }, |
| 39 | + "ecmaVersion": 12 |
| 40 | + }, |
| 41 | + "plugins": ["prettier", "react", "react-hooks"], |
| 42 | + "rules": { |
| 43 | + "react/jsx-uses-react": "error", |
| 44 | + "react/jsx-uses-vars": "error", |
| 45 | + "react/react-in-jsx-scope": "off", |
| 46 | + "no-undef": "off", |
| 47 | + "react/display-name": "off", |
| 48 | + "react/jsx-filename-extension": "off", |
| 49 | + "no-param-reassign": "off", |
| 50 | + "react/prop-types": 1, |
| 51 | + "react/require-default-props": "off", |
| 52 | + "react/no-array-index-key": "off", |
| 53 | + "react/jsx-props-no-spreading": "off", |
| 54 | + "react/forbid-prop-types": "off", |
| 55 | + "import/order": "off", |
| 56 | + "import/no-cycle": "off", |
| 57 | + "no-console": "off", |
| 58 | + "jsx-a11y/anchor-is-valid": "off", |
| 59 | + "prefer-destructuring": "off", |
| 60 | + "no-shadow": "off", |
| 61 | + "import/no-named-as-default": "off", |
| 62 | + "import/no-extraneous-dependencies": "off", |
| 63 | + "jsx-a11y/no-autofocus": "off", |
| 64 | + "no-restricted-imports": [ |
| 65 | + "error", |
| 66 | + { |
| 67 | + "patterns": ["@mui/*/*/*", "!@mui/material/test-utils/*"] |
| 68 | + } |
| 69 | + ], |
| 70 | + "no-unused-vars": [ |
| 71 | + "error", |
| 72 | + { |
| 73 | + "ignoreRestSiblings": false |
| 74 | + } |
| 75 | + ], |
| 76 | + "prettier/prettier": [ |
| 77 | + "warn", |
| 78 | + { |
| 79 | + "bracketSpacing": true, |
| 80 | + "printWidth": 140, |
| 81 | + "singleQuote": true, |
| 82 | + "trailingComma": "none", |
| 83 | + "tabWidth": 2, |
| 84 | + "useTabs": false, |
| 85 | + "endOfLine": "auto" |
| 86 | + } |
| 87 | + ] |
| 88 | + } |
56 | 89 | } |
0 commit comments