Repository navigation
Expand file tree
/
Copy path.oxlintrc.json
More file actions
230 lines (222 loc) · 7.35 KB
/
Copy path.oxlintrc.json
File metadata and controls
230 lines (222 loc) · 7.35 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["eslint", "typescript", "import", "vitest", "promise", "oxc"],
"jsPlugins": ["@containerbase/oxlint-plugin"],
"options": {
"typeAware": true,
"reportUnusedDisableDirectives": "error"
},
"categories": {
"correctness": "error"
},
"env": {
"builtin": true,
"node": true
},
"ignorePatterns": [
"dist/",
"packages/*/dist/",
"tmp/",
"bin/",
"coverage/",
"html/",
".claude/worktrees/",
".pnpm-store"
],
"rules": {
"containerbase/enforce-ts-extension": "error",
"containerbase/enum-member-pascal-case": "error",
"containerbase/no-undeclared-dependencies": "error",
"containerbase/organize-imports": "error",
"containerbase/test-root-describe": "error",
"import/default": "error",
"import/named": "error",
"import/namespace": "error",
"import/no-cycle": "error",
"import/no-duplicates": "error",
"import/export": "error",
"import/no-named-as-default": "error",
"import/extensions": ["error", "ignorePackages"],
"eqeqeq": "error",
"no-console": "error",
"no-negated-condition": "error",
"no-param-reassign": "error",
"no-template-curly-in-string": "error",
"radix": ["error", "as-needed"],
"curly": ["error", "all"],
"require-await": "error",
"no-var": "error",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"no-case-declarations": "error",
"no-empty": "error",
"no-prototype-builtins": "error",
"no-useless-escape": "error",
"no-fallthrough": "error",
"no-unused-vars": [
"error",
{ "vars": "all", "args": "none", "ignoreRestSiblings": true }
],
"no-unused-expressions": "error",
"no-empty-function": "error",
"no-array-constructor": "error",
"sort-imports": [
"error",
{
"ignoreCase": false,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
}
],
"no-restricted-imports": [
"error",
{
"paths": [
"nock",
"node:test",
"parse-link-header",
"path",
"semver",
{
"name": "vitest",
"importNames": ["it"],
"message": "Please use `vitest.test` instead."
}
]
}
],
"object-shorthand": ["error", "always", { "avoidQuotes": true }],
"typescript/consistent-type-assertions": [
"error",
{ "assertionStyle": "as", "objectLiteralTypeAssertions": "allow" }
],
"typescript/explicit-function-return-type": [
"error",
{ "allowExpressions": true, "allowTypedFunctionExpressions": true }
],
"typescript/restrict-template-expressions": [
"error",
{ "allowNumber": true, "allowBoolean": true }
],
"typescript/unbound-method": ["error", { "ignoreStatic": true }],
"typescript/restrict-plus-operands": "error",
"typescript/prefer-optional-chain": "error",
"typescript/prefer-nullish-coalescing": "error",
"typescript/no-empty-object-type": "error",
"typescript/array-type": "error",
"typescript/ban-ts-comment": "error",
"typescript/ban-tslint-comment": "error",
"typescript/class-literal-property-style": "error",
"typescript/consistent-generic-constructors": "error",
"typescript/consistent-indexed-object-style": "error",
"typescript/consistent-type-definitions": "error",
"typescript/dot-notation": "error",
"typescript/no-confusing-non-null-assertion": "error",
"typescript/no-inferrable-types": "error",
"typescript/no-namespace": "error",
"typescript/no-require-imports": "error",
"typescript/no-unsafe-function-type": "error",
"typescript/no-wrapper-object-types": "error",
"typescript/non-nullable-type-assertion-style": "error",
"typescript/only-throw-error": "error",
"typescript/prefer-find": "error",
"typescript/prefer-for-of": "error",
"typescript/prefer-function-type": "error",
"typescript/prefer-includes": "error",
"typescript/prefer-namespace-keyword": "error",
"typescript/prefer-promise-reject-errors": "error",
"typescript/prefer-regexp-exec": "error",
"typescript/prefer-string-starts-ends-with": "error",
"typescript/require-await": "error",
"typescript/triple-slash-reference": "error",
"typescript/no-unsafe-enum-comparison": "error",
"typescript/no-unsafe-unary-minus": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/no-redundant-type-constituents": "error",
"typescript/no-duplicate-type-constituents": "error",
"typescript/no-base-to-string": "error",
"typescript/no-misused-promises": "error",
"typescript/no-floating-promises": "error",
"typescript/await-thenable": "error",
"typescript/no-for-in-array": "error",
"typescript/no-implied-eval": "error",
"typescript/no-array-delete": "error",
"typescript/no-this-alias": "error",
"promise/always-return": "error",
"promise/catch-or-return": "error",
"promise/no-callback-in-promise": "error",
"promise/no-nesting": "error",
"promise/no-new-statics": "error",
"promise/no-promise-in-callback": "error",
"promise/no-return-in-finally": "error",
"promise/no-return-wrap": "error",
"promise/param-names": "error",
"promise/valid-params": "error",
"vitest/no-commented-out-tests": "error",
"vitest/no-conditional-expect": "error",
"vitest/no-disabled-tests": "error",
"vitest/no-focused-tests": "error",
"vitest/no-identical-title": "error",
"vitest/no-import-node-test": "error",
"vitest/no-interpolation-in-snapshots": "error",
"vitest/no-mocks-import": "error",
"vitest/no-standalone-expect": "error",
"vitest/no-unneeded-async-expect-function": "error",
"vitest/prefer-called-exactly-once-with": "error",
"vitest/require-local-test-context-for-concurrent-snapshots": "error",
"vitest/valid-describe-callback": "error",
"vitest/valid-expect": "error",
"vitest/valid-expect-in-promise": "error",
"vitest/valid-title": "error",
"vitest/require-mock-type-parameters": "off",
"vitest/require-to-throw-message": "off"
},
"overrides": [
{
"files": [
"test/**",
"tools/**",
"rolldown.config.ts",
"vitest.config.ts",
"__mocks__/**",
"**/*.spec.ts"
],
"rules": {
"containerbase/no-undeclared-dependencies": [
"error",
{ "allowDevDependencies": true }
]
}
},
{
"files": ["**/*.spec.ts", "test/**"],
"rules": {
"no-template-curly-in-string": "off",
"typescript/prefer-promise-reject-errors": "off",
"typescript/explicit-function-return-type": "off",
"typescript/unbound-method": "off",
"no-console": "off",
"vitest/expect-expect": [
"error",
{ "assertFunctionNames": ["expect", "expectTypeOf"] }
]
}
},
{
"files": ["**/*.{js,mjs,cjs}"],
"rules": {
"typescript/explicit-function-return-type": "off",
"typescript/restrict-template-expressions": "off",
"import/extensions": "off"
}
},
{
"files": ["tools/**/*.{ts,js,mjs,cjs}", "__mocks__/*.ts"],
"rules": {
"no-console": "off"
}
}
]
}