-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
181 lines (181 loc) · 6.06 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"airbnb-typescript",
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module",
"project": "tsconfig.base.json"
},
"plugins": [
"react",
"@typescript-eslint",
"import",
"@emotion"
],
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"node": {
"paths": ["src"]
}
}
},
"rules": {
"array-bracket-spacing": ["error"],
"arrow-parens": ["error", "as-needed"],
"block-spacing": ["error"],
"comma-spacing": ["error"],
"dot-location": ["error", "property"],
"eol-last": ["error"],
"eqeqeq": ["error"],
"key-spacing": ["error"],
"indent": "off",
"linebreak-style": ["error", "unix"],
"max-len": [
"warn",
{
"code": 140,
"ignoreTemplateLiterals": true,
"ignoreStrings": true,
"ignoreComments": true
}
],
"no-else-return": ["warn"],
"no-eq-null": ["error"],
"no-extra-bind": ["error"],
"no-multi-spaces": ["error"],
"no-multi-str": ["error"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-restricted-globals": [1, "console"],
"no-param-reassign": ["warn"],
"no-return-assign": ["off"],
"no-trailing-spaces": ["error"],
"no-undef-init": ["error"],
"no-unused-vars": "off",
"no-useless-return": ["error"],
"object-curly-newline": ["error", {
"ObjectPattern": { "multiline": true }
}],
"object-curly-spacing": ["error", "always"],
"operator-linebreak": ["error", "before"],
"space-infix-ops": ["error", { "int32Hint": false }],
"yoda": ["error"],
"@emotion/jsx-import": "error",
"@typescript-eslint/no-non-null-assertion": ["off"],
"@typescript-eslint/dot-notation": ["error"],
"@typescript-eslint/comma-spacing": ["error"],
"@typescript-eslint/comma-dangle": ["off"],
"@typescript-eslint/ban-ts-comment": ["off"],
"@typescript-eslint/ban-types": ["warn"],
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"@typescript-eslint/no-namespace": ["off"],
"@typescript-eslint/no-floating-promises": ["warn", { "ignoreIIFE": true }],
"@typescript-eslint/quotes": ["error", "double"],
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/no-use-before-define": ["warn", { "typedefs": false }],
"@typescript-eslint/no-empty-interface": ["off"],
"@typescript-eslint/require-await": ["warn"],
"@typescript-eslint/type-annotation-spacing": ["error", {"after": true}],
"@typescript-eslint/prefer-includes": ["error"],
"@typescript-eslint/no-misused-new": ["error"],
"@typescript-eslint/no-for-in-array": ["error"],
"@typescript-eslint/no-explicit-any": ["error", {"ignoreRestArgs": true}],
"@typescript-eslint/no-unused-expressions": ["off"],
"@typescript-eslint/no-redeclare": ["off"],
"@typescript-eslint/prefer-nullish-coalescing": ["error"],
"@typescript-eslint/no-shadow": ["warn"],
"@typescript-eslint/array-type": ["error", {"default": "array"}],
"@typescript-eslint/member-delimiter-style": ["error", {
"multiline": { "delimiter": "none" },
"singleline": { "delimiter": "semi", "requireLast": false }
}],
"@typescript-eslint/indent": ["error", 4, {
"ignoredNodes": [
"JSXAttribute"
],
"SwitchCase": 1
}],
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/return-await": ["error", "always"],
"react/prop-types": ["off"],
"react/display-name": ["off"],
"react/react-in-jsx-scope": ["off"],
"react/jsx-indent": ["error", 4, {"checkAttributes": true}],
"react/jsx-indent-props": ["error", "first"],
"react/jsx-fragments": ["error", "syntax"],
"react/jsx-curly-brace-presence": ["off"],
"react/jsx-curly-newline": "error",
"react/jsx-curly-spacing": ["error", {"when": "never", "allowMultiline": true, "children": {"when": "always"}}],
"react/jsx-closing-bracket-location": ["error", "after-props"],
"react/jsx-first-prop-new-line": ["error", "never"],
"react/jsx-equals-spacing": ["error", "never"],
"react/jsx-no-duplicate-props": ["error", { "ignoreCase": true }],
"react/jsx-tag-spacing": ["error", { "beforeClosing": "never" }],
"react/jsx-pascal-case": ["error", {"allowAllCaps": false}],
"react/jsx-props-no-multi-spaces": ["error"],
"react/jsx-no-undef": ["error", {"allowGlobals": false}],
"react/jsx-no-comment-textnodes": ["error"],
"react-hooks/exhaustive-deps": "off",
"import/no-default-export": ["off"],
"import/order": ["error", {
"groups": [["builtin", "external"], "internal", "parent", "sibling", "index", "object", "type"],
"newlines-between": "never",
"pathGroups": [
{
"pattern": "@perfema/**",
"group": "external"
}
],
"alphabetize": {
"order": "asc",
"caseInsensitive": false
}
}],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "none"
}
],
"react/jsx-key": "error",
"import/no-extraneous-dependencies": "off",
"react/jsx-props-no-spreading": "off",
"import/prefer-default-export": "off",
"react/jsx-boolean-value": "off",
"react/no-unescaped-entities": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-wrap-multilines": ["error",
{
"declaration": "parens-new-line",
"assignment": "parens-new-line",
"return": "parens-new-line",
"arrow": "parens-new-line",
"condition": "parens-new-line",
"logical": "parens-new-line",
"prop": "parens-new-line"
}
],
"react/destructuring-assignment": "off",
"space-in-parens": ["error"]
}
}