-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
77 lines (77 loc) · 2.36 KB
/
.eslintrc.json
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
66
67
68
69
70
71
72
73
74
75
76
77
{
"env": { "browser": true, "node": true, "es6": true },
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react/recommended", "prettier"],
"plugins": ["@typescript-eslint", "import", "eslint-plugin-import-helpers", "react"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": { "jsx": true }
},
"settings": {
"react": { "pragma": "React", "version": "17.0" }
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/explicit-module-boundary-types": "off",
"import/no-self-import": "error",
"import/no-cycle": "error",
"import/no-useless-path-segments": "error",
"import/no-relative-parent-imports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"react/boolean-prop-naming": [
"error",
{
"rule": "^(is|has|will|can)[A-Z]([A-Za-z0-9]?)+"
}
],
"react/button-has-type": "error",
"react/display-name": "off",
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-boolean-value": ["error", "never"],
"react/jsx-curly-brace-presence": ["error", "never"],
"react/jsx-sort-props": [
"error",
{
"callbacksLast": true,
"shorthandFirst": false,
"shorthandLast": true,
"ignoreCase": false,
"noSortAlphabetically": true,
"reservedFirst": ["key", "ref"]
}
],
"arrow-body-style": ["error", "as-needed"],
"sort-imports": [
"error",
{
"ignoreCase": true,
"ignoreDeclarationSort": true
}
],
"no-duplicate-imports": "error",
"no-throw-literal": "error",
"newline-before-return": "error",
"no-return-await": "error"
},
"overrides": [
{
"files": ["**/@types/**/*"],
"rules": {
"@typescript-eslint/consistent-type-definitions": "off"
}
}
]
}