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