-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.json
156 lines (156 loc) · 4.02 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"parser": "@babel/eslint-parser",
"plugins": ["react", "react-hooks", "prettier", "import"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended",
"plugin:import/recommended"
],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"requireConfigFile": false,
"babelOptions": {
"presets": ["@babel/preset-react"],
"parserOpts": {
"plugins": ["jsx"]
}
}
},
"settings": {
"import/resolver": {
"alias": [["~", "./src"]]
}
},
"env": {
"browser": true,
"node": true
},
"rules": {
"no-console": "error",
"react/jsx-filename-extension": [
"warn",
{
"extensions": [".js", ".jsx"]
}
],
"indent": "off",
"arrow-body-style": "error",
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"react/jsx-indent": ["error", 2],
"react/jsx-indent-props": ["error", "first"],
"react/require-default-props": "off",
"react/no-did-mount-set-state": "off",
"react/no-unused-state": "error",
"react/no-unused-prop-types": "off",
"react/jsx-curly-brace-presence": "error",
"react/jsx-boolean-value": "error",
"react/prefer-stateless-function": "error",
"react/jsx-closing-bracket-location": "error",
"no-unused-vars": "off",
"no-use-before-define": "off",
"no-unreachable": "error",
"spaced-comment": "error",
"react/prop-types": "off",
"react/default-props-match-prop-types": "off",
"react/jsx-props-no-spreading": "off",
"import/no-extraneous-dependencies": "off",
"import/prefer-default-export": "off",
"import/no-unresolved": "off",
"import/default": "off",
"import/named": "off",
"prettier/prettier": [
"error",
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "auto"
}
],
"import/order": [
"error",
{
"groups": ["external", "internal", "unknown"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
},
{
"pattern": "{./,**}/+(containers|components|pages|layouts){*,/**}",
"group": "internal",
"position": "before"
},
{
"pattern": "{./,**}/hooks{*,/**}",
"group": "internal",
"position": "before"
},
{
"pattern": "{./,**}/+(utils|services){*,/**}",
"group": "internal",
"position": "before"
},
{
"pattern": "**/api{*,/**}",
"group": "internal",
"position": "before"
},
{
"pattern": "{./,**}/context{*,/**}",
"group": "internal",
"position": "before"
},
{
"pattern": "**/store{*,/**}",
"group": "internal",
"position": "before"
},
{
"pattern": "{./,**}/+(routes|constants|fragments){*,/**}",
"group": "internal",
"position": "before"
},
{
"pattern": "**/schema",
"group": "internal",
"position": "before"
},
{
"pattern": "**/types{*,/**}",
"group": "internal",
"position": "after"
},
{
"pattern": "**/assets{*,/**}",
"group": "internal",
"position": "after"
}
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"no-undef": "warn"
}
}