-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
65 lines (63 loc) · 1.95 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"plugin:react/recommended",
"airbnb",
"prettier",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
},
plugins: [
"react",
"@typescript-eslint",
"prettier",
"simple-import-sort",
"jsx-a11y",
],
rules: {
"simple-import-sort/exports": "error",
"import/prefer-default-export": "off",
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
"react/jsx-no-useless-fragment": "off",
"import/extensions": "off",
"react/prop-types": "off",
"react/jsx-props-no-spreading": "off",
"react/no-array-index-key": "warn",
"react/button-has-type": "warn",
"react/require-default-props": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-indent": ["error", 2, { "checkAttributes": true, "indentLogicalExpressions": true }],
"react/jsx-indent-props": ["error", 2],
"react/jsx-max-props-per-line": ["error", { "maximum": { "single": 2, "multi": 1 } }],
"react/jsx-first-prop-new-line": ["error", "multiline"],
"no-trailing-spaces": ["error", { "skipBlankLines": false, "ignoreComments": false }],
"semi": ["error", "always"],
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
"jsx-quotes": ["error", "prefer-double"],
"comma-dangle": ["error", "only-multiline"],
"object-curly-spacing": ["error", "always"],
"array-bracket-spacing": ["error", "never"],
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {}
},
},
};