|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "browser": true, |
| 4 | + "es2021": true, |
| 5 | + "jest": true |
| 6 | + }, |
| 7 | + "extends": [ |
| 8 | + "eslint:recommended", |
| 9 | + "plugin:prettier/recommended", |
| 10 | + "plugin:react/recommended", |
| 11 | + "plugin:cypress/recommended" |
| 12 | + ], |
| 13 | + "parserOptions": { |
| 14 | + "ecmaFeatures": { |
| 15 | + "jsx": true |
| 16 | + }, |
| 17 | + "ecmaVersion": "latest", |
| 18 | + "sourceType": "module" |
| 19 | + }, |
| 20 | + "plugins": ["prettier", "react", "react-hooks", "import"], |
| 21 | + "rules": { |
| 22 | + "no-restricted-globals": "off", |
| 23 | + "prettier/prettier": [ |
| 24 | + "error", |
| 25 | + { |
| 26 | + "endOfLine": "auto" |
| 27 | + } |
| 28 | + ], |
| 29 | + "jsx-quotes": ["error", "prefer-double"], |
| 30 | + "quotes": [ |
| 31 | + "error", |
| 32 | + "single", |
| 33 | + { |
| 34 | + "avoidEscape": true |
| 35 | + } |
| 36 | + ], |
| 37 | + "object-shorthand": ["warn", "always"], |
| 38 | + "react/display-name": "warn", |
| 39 | + "react/jsx-no-useless-fragment": [ |
| 40 | + "warn", |
| 41 | + { |
| 42 | + "allowExpressions": true |
| 43 | + } |
| 44 | + ], |
| 45 | + "react/prop-types": "warn", |
| 46 | + "react/jsx-uses-react": "off", |
| 47 | + "react/react-in-jsx-scope": "off", |
| 48 | + "react/self-closing-comp": "warn", |
| 49 | + "react/jsx-curly-brace-presence": [ |
| 50 | + "warn", |
| 51 | + { |
| 52 | + "props": "never", |
| 53 | + "children": "ignore", |
| 54 | + "propElementValues": "always" |
| 55 | + } |
| 56 | + ], |
| 57 | + "react-hooks/rules-of-hooks": "warn", |
| 58 | + "react-hooks/exhaustive-deps": "warn", |
| 59 | + "sort-imports": [ |
| 60 | + "error", |
| 61 | + { |
| 62 | + "ignoreCase": false, |
| 63 | + "ignoreDeclarationSort": true |
| 64 | + } |
| 65 | + ], |
| 66 | + "import/order": [ |
| 67 | + 1, |
| 68 | + { |
| 69 | + "groups": [ |
| 70 | + "external", |
| 71 | + "builtin", |
| 72 | + "internal", |
| 73 | + "sibling", |
| 74 | + "parent", |
| 75 | + "index" |
| 76 | + ], |
| 77 | + "alphabetize": { |
| 78 | + "order": "asc", |
| 79 | + "caseInsensitive": true |
| 80 | + } |
| 81 | + } |
| 82 | + ], |
| 83 | + "import/no-duplicates": "warn" |
| 84 | + }, |
| 85 | + "settings": { |
| 86 | + "react": { |
| 87 | + "version": "detect" |
| 88 | + }, |
| 89 | + "import/resolver": { |
| 90 | + "node": { |
| 91 | + "paths": ["**/src"], |
| 92 | + "extensions": [".js", ".jsx"] |
| 93 | + } |
| 94 | + } |
| 95 | + } |
| 96 | +} |
0 commit comments