Open History to see the last commit
1{
2 "$schema": "./node_modules/oxlint/configuration_schema.json",
3 "plugins": [],
4 "jsPlugins": [
5 "eslint-plugin-unused-imports",
6 { "name": "eslint-js", "specifier": "oxlint-plugin-eslint" }
7 ],
8 "categories": {
9 "correctness": "off"
10 },
11 "env": {
12 "builtin": true
13 },
14 "ignorePatterns": [
15 "**/.nx/**",
16 "**/.svelte-kit/**",
17 "**/build/**",
18 "**/coverage/**",
19 "**/dist/**",
20 "**/snap/**",
21 "**/vite.config.*.timestamp-*.*",
22 "**/src/generated/**",
23 "**/*.tsrx.d.ts"
24 ],
25 "rules": {
26 "unused-imports/no-unused-imports": "warn"
27 },
28 "overrides": [
29 {
30 "files": ["**/*.{js,ts,tsx}"],
31 "rules": {
32 "for-direction": "error",
33 "no-async-promise-executor": "error",
34 "no-case-declarations": "error",
35 "no-class-assign": "error",
36 "no-compare-neg-zero": "error",
37 "no-cond-assign": "error",
38 "no-constant-binary-expression": "error",
39 "no-constant-condition": "error",
40 "no-control-regex": "error",
41 "no-debugger": "error",
42 "no-delete-var": "error",
43 "no-dupe-else-if": "error",
44 "no-duplicate-case": "error",
45 "no-empty-character-class": "error",
46 "no-empty-pattern": "error",
47 "no-empty-static-block": "error",
48 "no-ex-assign": "error",
49 "no-extra-boolean-cast": "error",
50 "no-fallthrough": "error",
51 "no-global-assign": "error",
52 "no-invalid-regexp": "error",
53 "no-irregular-whitespace": "error",
54 "no-loss-of-precision": "error",
55 "no-misleading-character-class": "error",
56 "no-nonoctal-decimal-escape": "error",
57 "no-regex-spaces": "error",
58 "no-self-assign": "error",
59 "no-shadow": "warn",
60 "no-shadow-restricted-names": "error",
61 "no-sparse-arrays": "error",
62 "no-unsafe-finally": "error",
63 "no-unsafe-optional-chaining": "error",
64 "no-unused-labels": "error",
65 "no-unused-private-class-members": "error",
66 "no-useless-backreference": "error",
67 "no-useless-catch": "error",
68 "no-useless-escape": "error",
69 "no-var": "error",
70 "no-with": "error",
71 "prefer-const": "error",
72 "require-yield": "error",
73 "use-isnan": "error",
74 "valid-typeof": "error",
75 "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
76 "import/first": "error",
77 "import/newline-after-import": "error",
78 "import/no-commonjs": "error",
79 "import/no-duplicates": "error",
80 "@stylistic/spaced-comment": "error",
81 "typescript/array-type": [
82 "error",
83 {
84 "default": "generic",
85 "readonly": "generic"
86 }
87 ],
88 "typescript/ban-ts-comment": [
89 "error",
90 {
91 "ts-expect-error": false,
92 "ts-ignore": "allow-with-description"
93 }
94 ],
95 "typescript/consistent-type-imports": [
96 "error",
97 {
98 "prefer": "type-imports"
99 }
100 ],
101 "typescript/method-signature-style": ["error", "property"],
102 "typescript/no-duplicate-enum-values": "error",
103 "typescript/no-extra-non-null-assertion": "error",
104 "typescript/no-inferrable-types": [
105 "error",
106 {
107 "ignoreParameters": true
108 }
109 ],
110 "typescript/no-misused-new": "error",
111 "typescript/no-namespace": "error",
112 "typescript/no-non-null-asserted-optional-chain": "error",
113 "typescript/no-unsafe-function-type": "error",
114 "typescript/no-wrapper-object-types": "error",
115 "typescript/prefer-as-const": "error",
116 "typescript/prefer-for-of": "warn",
117 "typescript/triple-slash-reference": "error"
118 },
119 "jsPlugins": ["@stylistic/eslint-plugin"],
120 "env": {
121 "es2020": true,
122 "browser": true
123 },
124 "plugins": ["typescript", "import"]
125 },
126 {
127 "files": ["**/*.vue"],
128 "rules": {
129 "for-direction": "error",
130 "no-async-promise-executor": "error",
131 "no-case-declarations": "error",
132 "no-class-assign": "error",
133 "no-compare-neg-zero": "error",
134 "no-cond-assign": "error",
135 "no-constant-binary-expression": "error",
136 "no-constant-condition": "error",
137 "no-control-regex": "error",
138 "no-debugger": "error",
139 "no-delete-var": "error",
140 "no-dupe-else-if": "error",
141 "no-duplicate-case": "error",
142 "no-empty-character-class": "error",
143 "no-empty-pattern": "error",
144 "no-empty-static-block": "error",
145 "no-ex-assign": "error",
146 "no-extra-boolean-cast": "error",
147 "no-fallthrough": "error",
148 "no-global-assign": "error",
149 "no-invalid-regexp": "error",
150 "no-irregular-whitespace": "error",
151 "no-loss-of-precision": "error",
152 "no-misleading-character-class": "error",
153 "no-nonoctal-decimal-escape": "error",
154 "no-regex-spaces": "error",
155 "no-self-assign": "error",
156 "no-shadow": "warn",
157 "no-shadow-restricted-names": "error",
158 "no-sparse-arrays": "error",
159 "no-unsafe-finally": "error",
160 "no-unsafe-optional-chaining": "error",
161 "no-unused-labels": "error",
162 "no-unused-private-class-members": "error",
163 "no-useless-backreference": "error",
164 "no-useless-catch": "error",
165 "no-useless-escape": "error",
166 "no-var": "error",
167 "no-with": "error",
168 "prefer-const": "error",
169 "require-yield": "error",
170 "use-isnan": "error",
171 "valid-typeof": "error",
172 "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
173 "import/first": "error",
174 "import/newline-after-import": "error",
175 "import/no-commonjs": "error",
176 "import/no-duplicates": "error",
177 "@stylistic/spaced-comment": "error",
178 "typescript/array-type": [
179 "error",
180 {
181 "default": "generic",
182 "readonly": "generic"
183 }
184 ],
185 "typescript/ban-ts-comment": [
186 "error",
187 {
188 "ts-expect-error": false,
189 "ts-ignore": "allow-with-description"
190 }
191 ],
192 "typescript/consistent-type-imports": [
193 "error",
194 {
195 "prefer": "type-imports"
196 }
197 ],
198 "typescript/method-signature-style": ["error", "property"],
199 "typescript/no-duplicate-enum-values": "error",
200 "typescript/no-extra-non-null-assertion": "error",
201 "typescript/no-inferrable-types": [
202 "error",
203 {
204 "ignoreParameters": true
205 }
206 ],
207 "typescript/no-misused-new": "error",
208 "typescript/no-namespace": "error",
209 "typescript/no-non-null-asserted-optional-chain": "error",
210 "typescript/no-unsafe-function-type": "error",
211 "typescript/no-wrapper-object-types": "error",
212 "typescript/prefer-as-const": "error",
213 "typescript/prefer-for-of": "warn",
214 "typescript/triple-slash-reference": "error"
215 },
216 "jsPlugins": ["@stylistic/eslint-plugin"],
217 "plugins": ["typescript", "import"],
218 "env": {
219 "browser": true
220 }
221 },
222 {
223 "files": ["packages/*/src/**/*.{ts,tsx}"],
224 "rules": {
225 "typescript/no-non-null-assertion": "error",
226 "typescript/no-explicit-any": "warn",
227 "typescript/no-floating-promises": "error",
228 "typescript/no-misused-promises": "error",
229 "typescript/await-thenable": "error",
230 "typescript/switch-exhaustiveness-check": "error",
231 "typescript/consistent-type-exports": "error",
232 "typescript/prefer-readonly": "error",
233 "typescript/ban-ts-comment": [
234 "error",
235 {
236 "ts-expect-error": "allow-with-description",
237 "ts-ignore": false,
238 "ts-nocheck": true,
239 "ts-check": false
240 }
241 ],
242 "eslint-js/no-restricted-syntax": [
243 "error",
244 {
245 "selector": "TSAsExpression > TSAsExpression[typeAnnotation.type='TSUnknownKeyword']",
246 "message": "Avoid `as unknown as <Type>` — it bypasses TS's structural overlap check. Prefer plain `as <Type>`, fix the root cause, or opt out with `// oxlint-disable-next-line eslint-js/no-restricted-syntax -- <reason>`."
247 }
248 ]
249 },
250 "plugins": ["typescript"]
251 }
252 ]
253}