-
Notifications
You must be signed in to change notification settings - Fork 806
Expand file tree
/
Copy path.oxlintrc.json
More file actions
205 lines (205 loc) · 6.74 KB
/
.oxlintrc.json
File metadata and controls
205 lines (205 loc) · 6.74 KB
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["import", "jsx-a11y", "nextjs", "promise", "react", "typescript", "unicorn"],
"ignorePatterns": [
"**/.next",
"**/.swc",
"**/node_modules",
"**/out",
"**/public",
"**/assets",
"README.md",
"next-env.d.ts"
],
"rules": {
"branches-sharing-code": "error",
"curly": "error",
"eqeqeq": [
"error",
"always",
{
"null": "ignore"
}
],
"func-style": ["error", "declaration"],
"no-unused-expressions": [
"error",
{
"allowShortCircuit": true,
"enforceForJSX": true
}
],
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "none",
"ignoreRestSiblings": true,
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_"
}
],
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-useless-return": "error",
"no-void": [
"error",
{
"allowAsStatement": true
}
],
"prefer-promise-reject-errors": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"sort-imports": [
"error",
{
"allowSeparatedGroups": true,
"ignoreDeclarationSort": true,
"ignoreCase": true
}
],
"import/consistent-type-specifier-style": ["error", "prefer-inline"],
"import/default": "error",
"import/namespace": "error",
"import/no-cycle": [
"error",
{
"maxDepth": 3
}
],
"import/no-duplicates": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-self-import": "error",
"jsx-a11y/alt-text": "error",
"jsx-a11y/anchor-has-content": "error",
"jsx-a11y/anchor-is-valid": "error",
"jsx-a11y/aria-props": "error",
"jsx-a11y/heading-has-content": "error",
"jsx-a11y/img-redundant-alt": "error",
"jsx-a11y/label-has-associated-control": "error",
"jsx-a11y/no-noninteractive-tabindex": "error",
"jsx-a11y/no-redundant-roles": "error",
"jsx-a11y/prefer-tag-over-role": "off",
"jsx-a11y/role-has-required-aria-props": "error",
"nextjs/google-font-display": "error",
"nextjs/google-font-preconnect": "error",
"nextjs/inline-script-id": "error",
"nextjs/next-script-for-ga": "error",
"nextjs/no-assign-module-variable": "error",
"nextjs/no-async-client-component": "error",
"nextjs/no-before-interactive-script-outside-document": "error",
"nextjs/no-css-tags": "error",
"nextjs/no-document-import-in-page": "error",
"nextjs/no-duplicate-head": "error",
"nextjs/no-head-element": "error",
"nextjs/no-head-import-in-document": "error",
"nextjs/no-html-link-for-pages": "error",
"nextjs/no-img-element": "off",
"nextjs/no-page-custom-font": "error",
"nextjs/no-script-component-in-head": "error",
"nextjs/no-styled-jsx-in-document": "error",
"nextjs/no-sync-scripts": "error",
"nextjs/no-title-in-document-head": "error",
"nextjs/no-typos": "error",
"nextjs/no-unwanted-polyfillio": "error",
"promise/always-return": "error",
"promise/no-callback-in-promise": "error",
"react-hooks/rules-of-hooks": "error",
"react/button-has-type": "error",
"react/forward-ref-uses-ref": "error",
"react/jsx-boolean-value": ["error"],
"react/jsx-curly-brace-presence": ["error"],
"react/jsx-fragments": ["error", "syntax"],
"react/jsx-key": [
"error",
{
"checkFragmentShorthand": true,
"checkKeyMustBeforeSpread": true,
"warnOnDuplicates": true
}
],
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-undef": "error",
"react/no-did-mount-set-state": "error",
"react/no-direct-mutation-state": "error",
"react/no-redundant-should-component-update": "error",
"react/no-string-refs": "error",
"react/no-this-in-sfc": "error",
"react/no-unknown-property": "error",
"react/no-unescaped-entities": "error",
"react/no-will-update-set-state": "error",
"react/self-closing-comp": "error",
"react/style-prop-object": "error",
"typescript/await-thenable": "error",
"typescript/ban-ts-comment": [
"error",
{
"minimumDescriptionLength": 3,
"ts-expect-error": "allow-with-description",
"ts-check": false,
"ts-ignore": true,
"ts-nocheck": true
}
],
"typescript/consistent-indexed-object-style": ["error", "record"],
"typescript/consistent-type-imports": [
"error",
{
"fixStyle": "inline-type-imports"
}
],
"typescript/no-confusing-non-null-assertion": "error",
"typescript/no-confusing-void-expression": [
"error",
{
"ignoreArrowShorthand": true
}
],
"typescript/no-extra-non-null-assertion": "error",
"typescript/no-misused-promises": [
"error",
{
"checksVoidReturn": false
}
],
"typescript/no-restricted-types": "error",
"typescript/no-unnecessary-boolean-literal-compare": "error",
"typescript/no-unnecessary-type-arguments": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/no-unnecessary-type-constraint": "error",
"typescript/no-unsafe-enum-comparison": "error",
"typescript/prefer-includes": "error",
"typescript/prefer-nullish-coalescing": "error",
"typescript/prefer-readonly": "error",
"typescript/return-await": ["error", "error-handling-correctness-only"],
"typescript/unbound-method": "off",
"unicorn/consistent-date-clone": "error",
"unicorn/consistent-empty-array-spread": "error",
"unicorn/consistent-existence-index-check": "error",
"unicorn/error-message": "error",
"unicorn/no-anonymous-default-export": "error",
"unicorn/no-immediate-mutation": "error",
"unicorn/no-length-as-slice-end": "error",
"unicorn/no-object-as-default-parameter": "error",
"unicorn/no-unnecessary-array-splice-count": "error",
"unicorn/no-useless-collection-argument": "error",
"unicorn/numeric-separators-style": "error",
"unicorn/prefer-array-find": "error",
"unicorn/prefer-array-flat": "error",
"unicorn/prefer-array-flat-map": "error",
"unicorn/prefer-array-some": "error",
"unicorn/prefer-date-now": "error",
"unicorn/prefer-includes": "error",
"unicorn/prefer-keyboard-event-key": "error",
"unicorn/prefer-math-min-max": "error",
"unicorn/prefer-native-coercion-functions": "error",
"unicorn/prefer-node-protocol": "error",
"unicorn/prefer-number-properties": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/require-number-to-fixed-digits-argument": "error"
}
}