-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
87 lines (87 loc) · 2.61 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
78
79
80
81
82
83
84
85
86
87
{
"extends": [
"next",
"next/core-web-vitals",
"prettier",
"plugin:testing-library/react",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript"
],
"plugins": ["@typescript-eslint", "testing-library", "jest", "jest-dom", "react"],
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"settings": {
"react": {
"pragma": "React", // Pragma to use, default to "React"
"version": "detect" // React version. "detect" automatically picks the version you have installed.
}
},
"rules": {
"testing-library/await-async-query": "off",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true,
"allowHigherOrderFunctions": true,
"allowDirectConstAssertionInArrowFunctions": false,
"allowConciseArrowFunctionExpressionsStartingWithVoid": false
}
],
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "enumMember",
"format": ["PascalCase"]
}
],
// eslint react
"react/jsx-key": ["error", { "checkFragmentShorthand": true }],
"react/destructuring-assignment": ["error", "always"],
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/no-deprecated": "error",
"react/no-children-prop": "error",
"react/no-is-mounted": "error",
"react/no-unstable-nested-components": "warn",
"react/forbid-component-props": ["error", { "forbid": ["style"] }],
"react/self-closing-comp": "error",
"react/void-dom-elements-no-children": "error",
"react/jsx-boolean-value": ["warn", "never"],
"react/jsx-curly-brace-presence": ["warn", "never"],
"react/jsx-fragments": ["error", "syntax"],
"react/jsx-uses-react": "error",
"react/jsx-pascal-case": "error",
"react/jsx-no-useless-fragment": "error",
"react/no-string-refs": "error",
"react/display-name": "off"
}
}