ultracite 7.9.2 → 7.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/eslint/core/rules/n.mjs +1 -0
- package/config/oxlint/core/index.mjs +3 -241
- package/config/oxlint/js-plugins/index.d.mts +5 -0
- package/config/oxlint/js-plugins/index.mjs +474 -0
- package/config/oxlint/next/index.mjs +0 -27
- package/config/oxlint/react/index.mjs +6 -158
- package/config/oxlint/tanstack/index.mjs +0 -26
- package/dist/index.js +45 -45
- package/package.json +3 -2
|
@@ -4,9 +4,6 @@ import { defineConfig } from "oxlint";
|
|
|
4
4
|
// is listed explicitly (mirroring the core config's philosophy), with
|
|
5
5
|
// decisions matching the ESLint react preset.
|
|
6
6
|
export default defineConfig({
|
|
7
|
-
jsPlugins: [
|
|
8
|
-
{ name: "react-doctor", specifier: "oxlint-plugin-react-doctor" },
|
|
9
|
-
],
|
|
10
7
|
plugins: ["react", "react-perf", "jsx-a11y"],
|
|
11
8
|
rules: {
|
|
12
9
|
"jsx-a11y/alt-text": "error",
|
|
@@ -46,7 +43,8 @@ export default defineConfig({
|
|
|
46
43
|
"jsx-a11y/scope": "error",
|
|
47
44
|
"jsx-a11y/tabindex-no-positive": "error",
|
|
48
45
|
// Inline JSX/object/array/function props are idiomatic modern React;
|
|
49
|
-
// the react-doctor rules cover the cases that
|
|
46
|
+
// the react-doctor rules (opt-in js-plugins preset) cover the cases that
|
|
47
|
+
// actually hurt.
|
|
50
48
|
"react-perf/jsx-no-jsx-as-prop": "off",
|
|
51
49
|
"react-perf/jsx-no-new-array-as-prop": "off",
|
|
52
50
|
"react-perf/jsx-no-new-function-as-prop": "off",
|
|
@@ -58,8 +56,8 @@ export default defineConfig({
|
|
|
58
56
|
"react/forbid-component-props": "off",
|
|
59
57
|
"react/forbid-dom-props": "error",
|
|
60
58
|
"react/forbid-elements": "error",
|
|
61
|
-
// forwardRef is deprecated in React 19;
|
|
62
|
-
//
|
|
59
|
+
// forwardRef is deprecated in React 19; react-doctor/no-react19-deprecated-apis
|
|
60
|
+
// (opt-in js-plugins preset) covers it.
|
|
63
61
|
"react/forward-ref-uses-ref": "off",
|
|
64
62
|
"react/hook-use-state": "error",
|
|
65
63
|
"react/iframe-missing-sandbox": "error",
|
|
@@ -81,8 +79,8 @@ export default defineConfig({
|
|
|
81
79
|
"react/jsx-pascal-case": "error",
|
|
82
80
|
"react/jsx-props-no-spread-multi": "error",
|
|
83
81
|
"react/jsx-props-no-spreading": "off",
|
|
84
|
-
// Off in the ESLint preset; react-doctor/no-random-key
|
|
85
|
-
// dangerous cases.
|
|
82
|
+
// Off in the ESLint preset; react-doctor/no-random-key (opt-in js-plugins
|
|
83
|
+
// preset) covers the dangerous cases.
|
|
86
84
|
"react/no-array-index-key": "off",
|
|
87
85
|
"react/no-children-prop": "error",
|
|
88
86
|
"react/no-clone-element": "error",
|
|
@@ -118,155 +116,5 @@ export default defineConfig({
|
|
|
118
116
|
"react/state-in-constructor": "error",
|
|
119
117
|
"react/style-prop-object": "error",
|
|
120
118
|
"react/void-dom-elements-no-children": "error",
|
|
121
|
-
|
|
122
|
-
"react-doctor/activity-wraps-effect-heavy-subtree": "error",
|
|
123
|
-
"react-doctor/advanced-event-handler-refs": "error",
|
|
124
|
-
"react-doctor/async-await-in-loop": "error",
|
|
125
|
-
"react-doctor/async-defer-await": "error",
|
|
126
|
-
"react-doctor/async-parallel": "error",
|
|
127
|
-
"react-doctor/auth-token-in-web-storage": "error",
|
|
128
|
-
"react-doctor/client-localstorage-no-version": "error",
|
|
129
|
-
"react-doctor/client-passive-event-listeners": "error",
|
|
130
|
-
"react-doctor/dialog-has-accessible-name": "error",
|
|
131
|
-
"react-doctor/effect-needs-cleanup": "error",
|
|
132
|
-
"react-doctor/hooks-no-nan-in-deps": "error",
|
|
133
|
-
"react-doctor/html-no-invalid-paragraph-child": "error",
|
|
134
|
-
"react-doctor/html-no-invalid-table-nesting": "error",
|
|
135
|
-
"react-doctor/html-no-nested-interactive": "error",
|
|
136
|
-
"react-doctor/jotai-derived-atom-returns-fresh-object": "error",
|
|
137
|
-
"react-doctor/jotai-select-atom-in-render-body": "error",
|
|
138
|
-
"react-doctor/jotai-tq-use-raw-query-atom": "error",
|
|
139
|
-
"react-doctor/js-async-reduce-without-awaited-acc": "error",
|
|
140
|
-
"react-doctor/js-batch-dom-css": "error",
|
|
141
|
-
"react-doctor/js-cache-property-access": "error",
|
|
142
|
-
"react-doctor/js-cache-storage": "error",
|
|
143
|
-
"react-doctor/js-combine-iterations": "error",
|
|
144
|
-
"react-doctor/js-early-exit": "error",
|
|
145
|
-
"react-doctor/js-flatmap-filter": "error",
|
|
146
|
-
"react-doctor/js-hoist-intl": "error",
|
|
147
|
-
"react-doctor/js-hoist-regexp": "error",
|
|
148
|
-
"react-doctor/js-index-maps": "error",
|
|
149
|
-
"react-doctor/js-length-check-first": "error",
|
|
150
|
-
"react-doctor/js-min-max-loop": "error",
|
|
151
|
-
"react-doctor/js-set-map-lookups": "error",
|
|
152
|
-
"react-doctor/js-tosorted-immutable": "error",
|
|
153
|
-
"react-doctor/no-adjust-state-on-prop-change": "error",
|
|
154
|
-
"react-doctor/no-array-index-as-key": "error",
|
|
155
|
-
"react-doctor/no-async-effect-callback": "error",
|
|
156
|
-
"react-doctor/no-barrel-import": "error",
|
|
157
|
-
"react-doctor/no-call-component-as-function": "error",
|
|
158
|
-
"react-doctor/no-cascading-set-state": "error",
|
|
159
|
-
"react-doctor/no-chain-state-updates": "error",
|
|
160
|
-
"react-doctor/no-create-context-in-render": "error",
|
|
161
|
-
"react-doctor/no-create-ref-in-function-component": "error",
|
|
162
|
-
"react-doctor/no-create-store-in-render": "error",
|
|
163
|
-
"react-doctor/no-derived-state": "error",
|
|
164
|
-
"react-doctor/no-derived-state-effect": "error",
|
|
165
|
-
"react-doctor/no-derived-useState": "error",
|
|
166
|
-
"react-doctor/no-direct-state-mutation": "error",
|
|
167
|
-
"react-doctor/no-disabled-zoom": "error",
|
|
168
|
-
"react-doctor/no-document-start-view-transition": "error",
|
|
169
|
-
"react-doctor/no-document-write": "error",
|
|
170
|
-
"react-doctor/no-dynamic-import-path": "error",
|
|
171
|
-
"react-doctor/no-effect-chain": "error",
|
|
172
|
-
"react-doctor/no-effect-event-handler": "error",
|
|
173
|
-
"react-doctor/no-effect-event-in-deps": "error",
|
|
174
|
-
"react-doctor/no-effect-with-fresh-deps": "error",
|
|
175
|
-
"react-doctor/no-eval": "error",
|
|
176
|
-
"react-doctor/no-event-handler": "error",
|
|
177
|
-
"react-doctor/no-event-trigger-state": "error",
|
|
178
|
-
"react-doctor/no-fetch-in-effect": "error",
|
|
179
|
-
"react-doctor/no-flush-sync": "error",
|
|
180
|
-
"react-doctor/no-full-lodash-import": "error",
|
|
181
|
-
"react-doctor/no-giant-component": "error",
|
|
182
|
-
"react-doctor/no-global-css-variable-animation": "error",
|
|
183
|
-
"react-doctor/no-gray-on-colored-background": "error",
|
|
184
|
-
"react-doctor/no-img-lazy-with-high-fetchpriority": "error",
|
|
185
|
-
"react-doctor/no-initialize-state": "error",
|
|
186
|
-
"react-doctor/no-inline-bounce-easing": "error",
|
|
187
|
-
"react-doctor/no-inline-exhaustive-style": "error",
|
|
188
|
-
"react-doctor/no-inline-prop-on-memo-component": "error",
|
|
189
|
-
"react-doctor/no-json-parse-stringify-clone": "error",
|
|
190
|
-
"react-doctor/no-jsx-element-type": "error",
|
|
191
|
-
"react-doctor/no-large-animated-blur": "error",
|
|
192
|
-
"react-doctor/no-layout-property-animation": "error",
|
|
193
|
-
"react-doctor/no-layout-transition-inline": "error",
|
|
194
|
-
"react-doctor/no-legacy-class-lifecycles": "error",
|
|
195
|
-
"react-doctor/no-legacy-context-api": "error",
|
|
196
|
-
"react-doctor/no-long-transition-duration": "error",
|
|
197
|
-
"react-doctor/no-many-boolean-props": "error",
|
|
198
|
-
"react-doctor/no-mirror-prop-effect": "error",
|
|
199
|
-
"react-doctor/no-moment": "error",
|
|
200
|
-
"react-doctor/no-mutable-in-deps": "error",
|
|
201
|
-
"react-doctor/no-mutating-reducer-state": "error",
|
|
202
|
-
"react-doctor/no-nested-component-definition": "error",
|
|
203
|
-
"react-doctor/no-outline-none": "error",
|
|
204
|
-
"react-doctor/no-pass-data-to-parent": "error",
|
|
205
|
-
"react-doctor/no-pass-live-state-to-parent": "error",
|
|
206
|
-
"react-doctor/no-permanent-will-change": "error",
|
|
207
|
-
"react-doctor/no-polymorphic-children": "error",
|
|
208
|
-
"react-doctor/no-prevent-default": "error",
|
|
209
|
-
"react-doctor/no-prop-callback-in-effect": "error",
|
|
210
|
-
"react-doctor/no-random-key": "error",
|
|
211
|
-
"react-doctor/no-react-dom-deprecated-apis": "error",
|
|
212
|
-
"react-doctor/no-react19-deprecated-apis": "error",
|
|
213
|
-
"react-doctor/no-render-in-render": "error",
|
|
214
|
-
"react-doctor/no-render-prop-children": "error",
|
|
215
|
-
"react-doctor/no-reset-all-state-on-prop-change": "error",
|
|
216
|
-
"react-doctor/no-scale-from-zero": "error",
|
|
217
|
-
"react-doctor/no-secrets-in-client-code": "error",
|
|
218
|
-
"react-doctor/no-self-updating-effect": "error",
|
|
219
|
-
"react-doctor/no-set-state-in-render": "error",
|
|
220
|
-
"react-doctor/no-string-false-on-boolean-attribute": "error",
|
|
221
|
-
"react-doctor/no-sync-xhr": "error",
|
|
222
|
-
"react-doctor/no-tiny-text": "error",
|
|
223
|
-
"react-doctor/no-transition-all": "error",
|
|
224
|
-
"react-doctor/no-uncontrolled-input": "error",
|
|
225
|
-
"react-doctor/no-undeferred-third-party": "error",
|
|
226
|
-
"react-doctor/no-usememo-simple-expression": "error",
|
|
227
|
-
"react-doctor/only-export-components": "error",
|
|
228
|
-
"react-doctor/prefer-dynamic-import": "error",
|
|
229
|
-
"react-doctor/prefer-explicit-variants": "error",
|
|
230
|
-
"react-doctor/prefer-html-dialog": "error",
|
|
231
|
-
"react-doctor/prefer-module-scope-pure-function": "error",
|
|
232
|
-
"react-doctor/prefer-module-scope-static-value": "error",
|
|
233
|
-
"react-doctor/prefer-stable-empty-fallback": "error",
|
|
234
|
-
"react-doctor/prefer-use-effect-event": "error",
|
|
235
|
-
"react-doctor/prefer-use-sync-external-store": "error",
|
|
236
|
-
"react-doctor/prefer-useReducer": "error",
|
|
237
|
-
"react-doctor/react-compiler-no-manual-memoization": "error",
|
|
238
|
-
"react-doctor/redux-useselector-inline-derivation": "error",
|
|
239
|
-
"react-doctor/redux-useselector-returns-new-collection": "error",
|
|
240
|
-
"react-doctor/rendering-animate-svg-wrapper": "error",
|
|
241
|
-
"react-doctor/rendering-conditional-render": "error",
|
|
242
|
-
"react-doctor/rendering-hoist-jsx": "error",
|
|
243
|
-
"react-doctor/rendering-hydration-mismatch-time": "error",
|
|
244
|
-
"react-doctor/rendering-hydration-no-flicker": "error",
|
|
245
|
-
"react-doctor/rendering-script-defer-async": "error",
|
|
246
|
-
"react-doctor/rendering-svg-precision": "error",
|
|
247
|
-
"react-doctor/rendering-usetransition-loading": "error",
|
|
248
|
-
"react-doctor/rerender-defer-reads-hook": "error",
|
|
249
|
-
"react-doctor/rerender-dependencies": "error",
|
|
250
|
-
"react-doctor/rerender-derived-state-from-hook": "error",
|
|
251
|
-
"react-doctor/rerender-functional-setstate": "error",
|
|
252
|
-
"react-doctor/rerender-lazy-ref-init": "error",
|
|
253
|
-
"react-doctor/rerender-lazy-state-init": "error",
|
|
254
|
-
"react-doctor/rerender-memo-before-early-return": "error",
|
|
255
|
-
"react-doctor/rerender-memo-with-default-value": "error",
|
|
256
|
-
"react-doctor/rerender-state-only-in-handlers": "error",
|
|
257
|
-
"react-doctor/rerender-transitions-scroll": "error",
|
|
258
|
-
"react-doctor/server-after-nonblocking": "error",
|
|
259
|
-
"react-doctor/server-auth-actions": "error",
|
|
260
|
-
"react-doctor/server-cache-with-object-literal": "error",
|
|
261
|
-
"react-doctor/server-dedup-props": "error",
|
|
262
|
-
"react-doctor/server-fetch-without-revalidate": "error",
|
|
263
|
-
"react-doctor/server-hoist-static-io": "error",
|
|
264
|
-
"react-doctor/server-no-mutable-module-state": "error",
|
|
265
|
-
"react-doctor/server-sequential-independent-await": "error",
|
|
266
|
-
"react-doctor/use-lazy-motion": "error",
|
|
267
|
-
"react-doctor/zod-v4-no-deprecated-error-apis": "error",
|
|
268
|
-
"react-doctor/zod-v4-no-deprecated-error-customization": "error",
|
|
269
|
-
"react-doctor/zod-v4-no-deprecated-schema-apis": "error",
|
|
270
|
-
"react-doctor/zod-v4-prefer-top-level-string-formats": "error",
|
|
271
119
|
},
|
|
272
120
|
});
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { defineConfig } from "oxlint";
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
|
-
jsPlugins: [
|
|
5
|
-
{ name: "react-doctor", specifier: "oxlint-plugin-react-doctor" },
|
|
6
|
-
],
|
|
7
4
|
overrides: [
|
|
8
5
|
{
|
|
9
6
|
files: ["**/routes/**/*.{tsx,ts}", "**/app/routes/**/*.{tsx,ts}"],
|
|
@@ -19,27 +16,4 @@ export default defineConfig({
|
|
|
19
16
|
},
|
|
20
17
|
},
|
|
21
18
|
],
|
|
22
|
-
rules: {
|
|
23
|
-
"react-doctor/query-destructure-result": "error",
|
|
24
|
-
"react-doctor/query-mutation-missing-invalidation": "error",
|
|
25
|
-
"react-doctor/query-no-query-in-effect": "error",
|
|
26
|
-
"react-doctor/query-no-rest-destructuring": "error",
|
|
27
|
-
"react-doctor/query-no-usequery-for-mutation": "error",
|
|
28
|
-
"react-doctor/query-no-void-query-fn": "error",
|
|
29
|
-
"react-doctor/query-stable-query-client": "error",
|
|
30
|
-
"react-doctor/tanstack-start-get-mutation": "error",
|
|
31
|
-
"react-doctor/tanstack-start-loader-parallel-fetch": "error",
|
|
32
|
-
"react-doctor/tanstack-start-missing-head-content": "error",
|
|
33
|
-
"react-doctor/tanstack-start-no-anchor-element": "error",
|
|
34
|
-
"react-doctor/tanstack-start-no-direct-fetch-in-loader": "error",
|
|
35
|
-
"react-doctor/tanstack-start-no-dynamic-server-fn-import": "error",
|
|
36
|
-
"react-doctor/tanstack-start-no-navigate-in-render": "error",
|
|
37
|
-
"react-doctor/tanstack-start-no-secrets-in-loader": "error",
|
|
38
|
-
"react-doctor/tanstack-start-no-use-server-in-handler": "error",
|
|
39
|
-
"react-doctor/tanstack-start-no-useeffect-fetch": "error",
|
|
40
|
-
"react-doctor/tanstack-start-redirect-in-try-catch": "error",
|
|
41
|
-
"react-doctor/tanstack-start-route-property-order": "error",
|
|
42
|
-
"react-doctor/tanstack-start-server-fn-method-order": "error",
|
|
43
|
-
"react-doctor/tanstack-start-server-fn-validate-input": "error",
|
|
44
|
-
},
|
|
45
19
|
});
|