|
| 1 | +{ |
| 2 | + "extends": [ |
| 3 | + "airbnb", |
| 4 | + "airbnb-typescript", |
| 5 | + "plugin:@typescript-eslint/recommended", |
| 6 | + "plugin:eslint-plugin-react/recommended", |
| 7 | + "plugin:unicorn/recommended", |
| 8 | + "plugin:prettier/recommended" |
| 9 | + ], |
| 10 | + "parser": "@typescript-eslint/parser", |
| 11 | + "parserOptions": { |
| 12 | + "ecmaFeatures": { |
| 13 | + "experimentalObjectRestSpread": true, |
| 14 | + "jsx": true |
| 15 | + }, |
| 16 | + "sourceType": "module", |
| 17 | + "project": "./tsconfig.json" |
| 18 | + }, |
| 19 | + "env": { |
| 20 | + "es6": true, |
| 21 | + "browser": true |
| 22 | + }, |
| 23 | + "plugins": [ |
| 24 | + "@typescript-eslint", |
| 25 | + "react", |
| 26 | + "react-hooks", |
| 27 | + "unicorn", |
| 28 | + "simple-import-sort", |
| 29 | + "import" |
| 30 | + ], |
| 31 | + "rules": { |
| 32 | + "prettier/prettier": [ |
| 33 | + "error", |
| 34 | + { |
| 35 | + "printWidth": 135, |
| 36 | + "tabWidth": 4, |
| 37 | + "trailingComma": "none" |
| 38 | + }, |
| 39 | + { |
| 40 | + "usePrettierrc": false |
| 41 | + } |
| 42 | + ], |
| 43 | + "max-len": "off", |
| 44 | + "curly": [ |
| 45 | + "error", |
| 46 | + "all" |
| 47 | + ], |
| 48 | + "react-hooks/rules-of-hooks": "error", |
| 49 | + "react-hooks/exhaustive-deps": "warn", |
| 50 | + "react/jsx-filename-extension": [ |
| 51 | + 1, |
| 52 | + { |
| 53 | + "extensions": [ |
| 54 | + ".tsx" |
| 55 | + ] |
| 56 | + } |
| 57 | + ], |
| 58 | + "import/prefer-default-export": "off", |
| 59 | + "import/extensions": [ |
| 60 | + "error", |
| 61 | + "ignorePackages", |
| 62 | + { |
| 63 | + "ts": "never", |
| 64 | + "tsx": "never" |
| 65 | + } |
| 66 | + ], |
| 67 | + "import/no-extraneous-dependencies": "off", |
| 68 | + "unicorn/filename-case": "off", |
| 69 | + "no-use-before-define": "off", |
| 70 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 71 | + "unicorn/prevent-abbreviations": "off", |
| 72 | + "class-methods-use-this": "off", |
| 73 | + "@typescript-eslint/ban-ts-comment": "off", |
| 74 | + "@typescript-eslint/no-explicit-any": "off", |
| 75 | + "no-plusplus": "off", |
| 76 | + "unicorn/no-null": "off", |
| 77 | + "no-underscore-dangle": "off", |
| 78 | + "unicorn/no-useless-undefined": "off", |
| 79 | + "@typescript-eslint/indent": "off", |
| 80 | + "@typescript-eslint/quotes": "off", |
| 81 | + "@typescript-eslint/comma-dangle": "off", |
| 82 | + "react/jsx-indent": "off", |
| 83 | + "react/jsx-indent-props": "off", |
| 84 | + "@typescript-eslint/no-use-before-define": "off", |
| 85 | + "react/destructuring-assignment": "off", |
| 86 | + "react/display-name": "off", |
| 87 | + "react/require-default-props": "off", |
| 88 | + "naming-convention": "off", |
| 89 | + "@typescript-eslint/naming-convention": [ |
| 90 | + "error", |
| 91 | + { |
| 92 | + "selector": "variable", |
| 93 | + "format": [ |
| 94 | + "camelCase", |
| 95 | + "UPPER_CASE", |
| 96 | + "PascalCase" |
| 97 | + ], |
| 98 | + "leadingUnderscore": "allow", |
| 99 | + "trailingUnderscore": "allow" |
| 100 | + }, |
| 101 | + { |
| 102 | + "selector": "function", |
| 103 | + "format": [ |
| 104 | + "PascalCase", |
| 105 | + "camelCase" |
| 106 | + ], |
| 107 | + "leadingUnderscore": "allow", |
| 108 | + "trailingUnderscore": "allow" |
| 109 | + }, |
| 110 | + { |
| 111 | + "selector": "import", |
| 112 | + "format": ["PascalCase", "camelCase"] |
| 113 | + }, |
| 114 | + { |
| 115 | + "selector": "enumMember", |
| 116 | + "format": [ |
| 117 | + "UPPER_CASE" |
| 118 | + ] |
| 119 | + }, |
| 120 | + { |
| 121 | + "selector": "property", |
| 122 | + "format": null |
| 123 | + }, |
| 124 | + { |
| 125 | + "selector": "typeLike", |
| 126 | + "format": [ |
| 127 | + "PascalCase" |
| 128 | + ] |
| 129 | + }, |
| 130 | + { |
| 131 | + "selector": "accessor", |
| 132 | + "format": [ |
| 133 | + "PascalCase" |
| 134 | + ] |
| 135 | + }, |
| 136 | + { |
| 137 | + "selector": "default", |
| 138 | + "format": [ |
| 139 | + "camelCase" |
| 140 | + ], |
| 141 | + "leadingUnderscore": "allow", |
| 142 | + "trailingUnderscore": "allow" |
| 143 | + } |
| 144 | + ], |
| 145 | + "no-restricted-syntax": "off", |
| 146 | + "no-await-in-loop": "off", |
| 147 | + "default-case": [ |
| 148 | + "error", |
| 149 | + { |
| 150 | + "commentPattern": "^skip\\sdefault$" |
| 151 | + } |
| 152 | + ], |
| 153 | + "consistent-return": "off", |
| 154 | + "jsx-a11y/anchor-is-valid": "off", |
| 155 | + "unicorn/prefer-node-protocol": "off", |
| 156 | + "no-param-reassign": [ |
| 157 | + "error", |
| 158 | + { |
| 159 | + "props": false |
| 160 | + } |
| 161 | + ], |
| 162 | + "operator-linebreak": "off", |
| 163 | + "jsx-props-no-spreading": "off", |
| 164 | + "react/jsx-props-no-spreading": "off", |
| 165 | + "unicorn/no-unreadable-array-destructuring": "off", |
| 166 | + "unicorn/prefer-export-from": "off", |
| 167 | + "unicorn/prefer-module": "off", |
| 168 | + "unicorn/prefer-top-level-await": "off", |
| 169 | + "react/function-component-definition": [ |
| 170 | + 2, |
| 171 | + { |
| 172 | + "namedComponents": [ |
| 173 | + "function-declaration", |
| 174 | + "arrow-function" |
| 175 | + ] |
| 176 | + } |
| 177 | + ], |
| 178 | + "import/no-import-module-exports": "off", |
| 179 | + "react/jsx-uses-react": "off", |
| 180 | + "react/react-in-jsx-scope": "off", |
| 181 | + "react/jsx-max-props-per-line": "off", |
| 182 | + "no-nested-ternary": "error", |
| 183 | + "import/order": "off", |
| 184 | + "simple-import-sort/imports": [ |
| 185 | + "error", |
| 186 | + { |
| 187 | + "groups": [ |
| 188 | + ["^\\u0000"], |
| 189 | + ["^react"], |
| 190 | + ["^(\\w|@reduxjs\/toolkit)"], |
| 191 | + ["^@noones"], |
| 192 | + ["^@\\w"], |
| 193 | + ["^"], |
| 194 | + ["^\\."] |
| 195 | + ] |
| 196 | + } |
| 197 | + ], |
| 198 | + "simple-import-sort/exports": "error", |
| 199 | + "import/first": "error", |
| 200 | + "import/newline-after-import": "error", |
| 201 | + "import/no-duplicates": "error", |
| 202 | + "no-continue": "off", |
| 203 | + "jsx-a11y/label-has-associated-control": [ |
| 204 | + "error", |
| 205 | + { |
| 206 | + "required": { |
| 207 | + "some": ["nesting", "id"] |
| 208 | + } |
| 209 | + } |
| 210 | + ], |
| 211 | + "no-console": "off" |
| 212 | + }, |
| 213 | + "settings": { |
| 214 | + "import/resolver": { |
| 215 | + "typescript": {} |
| 216 | + }, |
| 217 | + "react": { |
| 218 | + "version": "detect" |
| 219 | + } |
| 220 | + } |
| 221 | +} |
0 commit comments