-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
166 lines (154 loc) · 5.52 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
157
158
159
160
161
162
163
164
165
166
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"airbnb",
"airbnb/hooks"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"@typescript-eslint",
"react",
"react-hooks"
],
"rules": {
"max-len": [
"error",
{
"code": 120,
"tabWidth": 2,
"ignoreComments": true,
"ignoreStrings": true
}
],
"no-bitwise": ["error", { "allow": ["~"] }],
"no-console": ["error", { "allow": ["warn", "error", "info"] }],
"no-underscore-dangle": "off",
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}
],
"linebreak-style": "off",
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/no-array-constructor": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }],
"@typescript-eslint/no-useless-constructor": "off",
"@typescript-eslint/no-unused-expressions": "off",
"no-plusplus": ["off", { "allowForLoopAfterthoughts": true }],
"global-require": "off",
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
"object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
"no-restricted-syntax": ["error", "WithStatement"],
"function-paren-newline": ["warn", "consistent"],
"object-curly-newline": ["error", { "consistent": true }],
"object-curly-spacing": "off",
"template-curly-spacing": ["error", "never"],
"arrow-parens": ["error", "as-needed", { "requireForBlockBody": false }],
"arrow-body-style": ["error", "as-needed"],
"operator-linebreak": ["error", "after"],
"no-param-reassign": ["error", { "props": true, "ignorePropertyModificationsFor": ["draft"] }],
"consistent-return": ["off"],
"wrap-iife": ["error", "inside"],
"no-multiple-empty-lines": ["error", { "max": 2 }],
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"import/no-named-as-default-member": "off",
"import/no-import-module-exports": "off",
"import/no-relative-packages": "off",
"import/named": "off",
"import/extensions": [
"error",
{
"js": "never",
"json": "always",
"png": "always",
"svg": "always",
"locales": "always",
"styles": "always",
"store": "always",
"shared": "always",
"lazy": "always",
"css": "always"
}
],
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "index", "parent", "sibling"],
"newlines-between": "always",
"pathGroups": [
{
"pattern": "{widgets,components,config,layouts}/**",
"group": "internal",
"position": "before"
},
{
"pattern": "./*.*",
"group": "sibling",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["builtin"]
}
],
"react/jsx-props-no-spreading": "off",
"react/jsx-filename-extension": "off",
"react/jsx-first-prop-new-line": ["error", "multiline-multiprop"],
"react/jsx-max-props-per-line": "off",
"react/no-multi-comp": "off",
"react/jsx-fragments": "off",
"react/forbid-prop-types": "off",
"react/prop-types": "off",
"react/display-name": "off",
"react/react-in-jsx-scope": "off",
"react/function-component-definition": ["error", { "namedComponents": "function-declaration" }],
"prefer-arrow-callback": [ "error", { "allowNamedFunctions": true } ],
"react/no-unstable-nested-components": ["error", { "allowAsProps": true }],
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
"react/no-unescaped-entities": "off",
"camelcase": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "off",
"emotion/jsx-import": "off",
"testing-library/no-node-access": "off",
"testing-library/prefer-screen-queries": "off",
"testing-library/prefer-find-by": "off",
"testing-library/prefer-presence-queries": "off",
"testing-library/no-container": "off",
"function-call-argument-newline": "off",
"default-param-last": "off",
"no-restricted-exports": "off",
"jsx-a11y/label-has-associated-control": [
2,
{
"labelComponents": ["CustomInputLabel"],
"labelAttributes": ["label"],
"controlComponents": ["CustomInput"],
"depth": 3
}
]
}
}