@nekoyasuii/config 0.1.3 → 0.1.5

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.
@@ -0,0 +1,32 @@
1
+ // tools/oxlint/config/no-comment-slop/index.ts
2
+ import { existsSync } from "node:fs";
3
+ import { fileURLToPath } from "node:url";
4
+ import { defineConfig } from "oxlint";
5
+ var pluginCandidates = [
6
+ new URL("plugin.js", import.meta.url),
7
+ new URL("tools/oxlint/config/no-comment-slop/plugin.js", import.meta.url)
8
+ ];
9
+ var noCommentSlopPluginPath = fileURLToPath(pluginCandidates.find((candidate) => existsSync(candidate)) ?? pluginCandidates[0]);
10
+ var noCommentSlopConfig = defineConfig({
11
+ jsPlugins: [
12
+ {
13
+ name: "no-comment-slop",
14
+ specifier: noCommentSlopPluginPath
15
+ }
16
+ ],
17
+ rules: {
18
+ "no-comment-slop/max-comment-lines": "error",
19
+ "no-comment-slop/no-banner-comment": "error",
20
+ "no-comment-slop/no-trailing-comment": "error",
21
+ "no-comment-slop/prefer-jsdoc-for-exports": "error",
22
+ "no-comment-slop/prefer-jsdoc-for-members": "error",
23
+ "no-comment-slop/require-member-docs": "error",
24
+ "no-comment-slop/multiline-jsdoc-format": "error",
25
+ "no-comment-slop/no-trailing-period": "error",
26
+ "no-comment-slop/no-em-dash": "error",
27
+ "no-comment-slop/no-jargon": "error",
28
+ "no-comment-slop/no-foreign-syntax": "error"
29
+ }
30
+ });
31
+
32
+ export { noCommentSlopConfig };
@@ -37,6 +37,19 @@ var config = defineConfig({
37
37
  rules: {
38
38
  "sonarjs/no-duplicate-string": "off"
39
39
  }
40
+ },
41
+ {
42
+ files: ["**/*.{ts,tsx}"],
43
+ rules: {
44
+ "lazuee/no-ts-accessibility": "error",
45
+ "lazuee/interface-pascal-case": "error"
46
+ }
47
+ },
48
+ {
49
+ files: ["**/*.{ts,tsx,js,jsx}"],
50
+ rules: {
51
+ "lazuee/canonical-header-names": "off"
52
+ }
40
53
  }
41
54
  ],
42
55
  rules: {
@@ -412,7 +425,10 @@ var config = defineConfig({
412
425
  "tailwindcss/consistent-variant-order": "warn",
413
426
  "tailwindcss/enforce-consistent-important-position": "warn",
414
427
  "tailwindcss/no-unnecessary-whitespace": "warn",
415
- "lazuee/prefer-alias": "error"
428
+ "lazuee/prefer-alias": "error",
429
+ "lazuee/no-ts-accessibility": "off",
430
+ "lazuee/interface-pascal-case": "off",
431
+ "lazuee/canonical-header-names": "off"
416
432
  }
417
433
  });
418
434
  var js_plugins_default = config;
@@ -11,6 +11,12 @@ export declare const antiSlopConfig: {
11
11
  "anti-slop/no-object-parameters": "error";
12
12
  "anti-slop/no-reflect-apply": "error";
13
13
  "anti-slop/no-reflect-get": "error";
14
+ /**
15
+ * allowInTypeGuards exempts `typeof` inside type predicate functions
16
+ * ((x): x is T): predicates are the named-boundary pattern the rule
17
+ * pushes toward, and hand-rolled JSON/boundary validation has no other
18
+ * way to write the check (dmmulroy/anti-slop#10)
19
+ */
14
20
  "anti-slop/no-runtime-typeof": ["error", {
15
21
  allowInTypeGuards: boolean;
16
22
  }];
@@ -21,6 +27,15 @@ export declare const antiSlopConfig: {
21
27
  "anti-slop/no-unsafe-dictionary-type": "error";
22
28
  "anti-slop/no-widen-then-assert": "error";
23
29
  "anti-slop/require-safety-comment-for-type-assertion": "error";
30
+ /**
31
+ * Core rules that pinch against anti-slop when both are enabled:
32
+ * consistent-indexed-object-style's autofix rewrites index-signature
33
+ * interfaces into `Record` aliases, which no-known-value-widening
34
+ * resolves and re-flags (a fix/break loop)
35
+ *
36
+ * no-immediate-mutation bans the empty-accumulator escape from the same
37
+ * rule. Extending this preset after core turns them off by default
38
+ */
24
39
  "typescript/consistent-indexed-object-style": "off";
25
40
  "unicorn/no-immediate-mutation": "off";
26
41
  };
@@ -4,6 +4,10 @@ export declare const coreConfig: {
4
4
  };
5
5
  ignorePatterns: string[];
6
6
  overrides: {
7
+ /**
8
+ * Shared test file overrides: framework-specific test rules
9
+ * are in separate jest/ and vitest/ configs to avoid conflicts
10
+ */
7
11
  files: string[];
8
12
  rules: {
9
13
  "no-empty-function": "off";
@@ -12,6 +16,7 @@ export declare const coreConfig: {
12
16
  }[];
13
17
  plugins: ("eslint" | "import" | "jsdoc" | "node" | "oxc" | "promise" | "typescript" | "unicorn")[];
14
18
  rules: {
19
+ /** ── eslint ────────────────────────────────────────────────────────── */
15
20
  "accessor-pairs": "error";
16
21
  "array-callback-return": "error";
17
22
  "arrow-body-style": ["error", "as-needed"];
@@ -165,6 +170,7 @@ export declare const coreConfig: {
165
170
  "no-useless-rename": "error";
166
171
  "no-useless-return": "error";
167
172
  "no-var": "error";
173
+ /** Avoid conflict with typescript/no-floating-promises */
168
174
  "no-void": ["error", {
169
175
  allowAsStatement: true;
170
176
  }];
@@ -191,6 +197,7 @@ export declare const coreConfig: {
191
197
  "require-await": "error";
192
198
  "require-unicode-regexp": "error";
193
199
  "require-yield": "error";
200
+ /** Rely on oxfmt `experimentalSortImports` instead */
194
201
  "sort-imports": "off";
195
202
  "sort-keys": "off";
196
203
  "sort-vars": "error";
@@ -200,6 +207,7 @@ export declare const coreConfig: {
200
207
  "valid-typeof": "error";
201
208
  "vars-on-top": "error";
202
209
  yoda: "error";
210
+ /** ── import ───────────────────────────────────────────────────────── */
203
211
  "import/consistent-type-specifier-style": ["error", "prefer-top-level"];
204
212
  "import/default": "error";
205
213
  "import/exports-last": "off";
@@ -231,6 +239,7 @@ export declare const coreConfig: {
231
239
  "import/no-webpack-loader-syntax": "error";
232
240
  "import/prefer-default-export": "off";
233
241
  "import/unambiguous": "off";
242
+ /** ── jsdoc ────────────────────────────────────────────────────────── */
234
243
  "jsdoc/check-access": "error";
235
244
  "jsdoc/check-property-names": "error";
236
245
  "jsdoc/check-tag-names": "error";
@@ -254,6 +263,7 @@ export declare const coreConfig: {
254
263
  "jsdoc/require-yields": "error";
255
264
  "jsdoc/require-yields-description": "error";
256
265
  "jsdoc/require-yields-type": "error";
266
+ /** ── node ─────────────────────────────────────────────────────────── */
257
267
  "node/callback-return": "error";
258
268
  "node/exports-style": "error";
259
269
  "node/global-require": "error";
@@ -264,7 +274,12 @@ export declare const coreConfig: {
264
274
  "node/no-path-concat": "error";
265
275
  "node/no-process-env": "off";
266
276
  "node/no-sync": "off";
277
+ /**
278
+ * Top-level await is idiomatic in ESM: Astro frontmatter, build
279
+ * scripts, and CLI entry points all rely on it
280
+ */
267
281
  "node/no-top-level-await": "off";
282
+ /** ── oxc ──────────────────────────────────────────────────────────── */
268
283
  "oxc/approx-constant": "error";
269
284
  "oxc/bad-array-method-on-arguments": "error";
270
285
  "oxc/bad-bitwise-operator": "error";
@@ -292,6 +307,7 @@ export declare const coreConfig: {
292
307
  "oxc/number-arg-out-of-range": "error";
293
308
  "oxc/only-used-in-recursion": "error";
294
309
  "oxc/uninvoked-array-callback": "error";
310
+ /** ── promise ──────────────────────────────────────────────────────── */
295
311
  "promise/always-return": "off";
296
312
  "promise/avoid-new": "error";
297
313
  "promise/catch-or-return": "off";
@@ -307,6 +323,7 @@ export declare const coreConfig: {
307
323
  "promise/prefer-catch": "error";
308
324
  "promise/spec-only": "error";
309
325
  "promise/valid-params": "error";
326
+ /** ── typescript ───────────────────────────────────────────────────── */
310
327
  "typescript/adjacent-overload-signatures": "error";
311
328
  "typescript/array-type": "error";
312
329
  "typescript/await-thenable": "error";
@@ -415,6 +432,7 @@ export declare const coreConfig: {
415
432
  "typescript/unbound-method": "error";
416
433
  "typescript/unified-signatures": "error";
417
434
  "typescript/use-unknown-in-catch-callback-variable": "error";
435
+ /** ── unicorn ──────────────────────────────────────────────────────── */
418
436
  "unicorn/consistent-template-literal-escape": "error";
419
437
  "unicorn/catch-error-name": "error";
420
438
  "unicorn/consistent-assert": "error";
@@ -485,6 +503,7 @@ export declare const coreConfig: {
485
503
  "unicorn/no-useless-switch-case": "error";
486
504
  "unicorn/no-useless-undefined": "error";
487
505
  "unicorn/no-zero-fractions": "error";
506
+ /** Disabled due to https://github.com/oxc-project/oxc/issues/21949 */
488
507
  "unicorn/number-literal-case": "off";
489
508
  "unicorn/numeric-separators-style": "error";
490
509
  "unicorn/prefer-add-event-listener": "error";
@@ -604,15 +604,43 @@ declare const _default: {
604
604
  readonly name: "lazuee";
605
605
  readonly specifier: string;
606
606
  })[];
607
- overrides: {
607
+ overrides: ({
608
608
  files: string[];
609
609
  rules: {
610
- [k: string]: "off";
610
+ [k: string]: any;
611
611
  };
612
- }[];
612
+ } | {
613
+ files: string[];
614
+ rules: {
615
+ [k: string]: any;
616
+ };
617
+ } | {
618
+ files: string[];
619
+ rules: {
620
+ [k: string]: any;
621
+ };
622
+ })[];
613
623
  rules: {
614
624
  [k: string]: "error" | "off" | "warn" | ["error", number];
615
625
  };
626
+ } | {
627
+ jsPlugins: {
628
+ name: string;
629
+ specifier: string;
630
+ }[];
631
+ rules: {
632
+ "no-comment-slop/max-comment-lines": "error";
633
+ "no-comment-slop/no-banner-comment": "error";
634
+ "no-comment-slop/no-trailing-comment": "error";
635
+ "no-comment-slop/prefer-jsdoc-for-exports": "error";
636
+ "no-comment-slop/prefer-jsdoc-for-members": "error";
637
+ "no-comment-slop/require-member-docs": "error";
638
+ "no-comment-slop/multiline-jsdoc-format": "error";
639
+ "no-comment-slop/no-trailing-period": "error";
640
+ "no-comment-slop/no-em-dash": "error";
641
+ "no-comment-slop/no-jargon": "error";
642
+ "no-comment-slop/no-foreign-syntax": "error";
643
+ };
616
644
  } | {
617
645
  plugins: ("jsx-a11y" | "react" | "react-perf")[];
618
646
  rules: {
@@ -773,6 +801,12 @@ declare const _default: {
773
801
  };
774
802
  })[];
775
803
  rules: {
804
+ /**
805
+ * Opinionated anti-slop rules that flag valid code: a comment above
806
+ * every type assertion and explicit named contracts like
807
+ * `Record<Theme, ThemeColors>`. Runtime `typeof` narrowing is how form
808
+ * data and `unknown` route errors are parsed before use.
809
+ */
776
810
  "anti-slop/require-safety-comment-for-type-assertion": "off";
777
811
  "anti-slop/no-known-value-widening": "off";
778
812
  "anti-slop/no-runtime-typeof": "off";
@@ -3,11 +3,14 @@ import {
3
3
  } from "../../../chunk-08m6971b.js";
4
4
  import {
5
5
  selectJsPlugins
6
- } from "../../../chunk-1chg07xf.js";
6
+ } from "../../../chunk-fqcw0kzp.js";
7
7
  import"../../../chunk-41590bpf.js";
8
8
  import {
9
9
  reactConfig
10
10
  } from "../../../chunk-0xdbbpn5.js";
11
+ import {
12
+ noCommentSlopConfig
13
+ } from "../../../chunk-97s6xvc6.js";
11
14
  import {
12
15
  antiSlopConfig
13
16
  } from "../../../chunk-c8jq73qx.js";
@@ -16,7 +19,13 @@ import"../../../chunk-5wgwscd0.js";
16
19
  // tools/oxlint/config/index.ts
17
20
  import { defineConfig } from "oxlint";
18
21
  var config_default = defineConfig({
19
- extends: [coreConfig, reactConfig, selectJsPlugins(["lazuee", "react-doctor"]), antiSlopConfig],
22
+ extends: [
23
+ coreConfig,
24
+ reactConfig,
25
+ selectJsPlugins(["lazuee", "react-doctor"]),
26
+ antiSlopConfig,
27
+ noCommentSlopConfig
28
+ ],
20
29
  ignorePatterns: [...coreConfig.ignorePatterns ?? []],
21
30
  overrides: [
22
31
  {
@@ -1,3 +1,42 @@
1
+ /**
2
+ * eslint-plugin-github, eslint-plugin-sonarjs, and
3
+ * oxlint-plugin-react-doctor run through oxlint's JS plugin support to close
4
+ * the gap with the ESLint preset and to add React Doctor's extra checks
5
+ *
6
+ * This preset is opt-in: extend it alongside core (and any framework preset)
7
+ * only when you want those rules and accept the extra dependencies plus the
8
+ * slower JS-plugin lint pass. Rules that require type information are not
9
+ * supported by the JS plugin bridge and are excluded
10
+ *
11
+ * The react-doctor rules were previously bundled into the react/next/
12
+ * tanstack presets; they live here now so those framework presets run
13
+ * entirely on oxlint's native Rust rules. Framework-specific react-doctor
14
+ * rules (Next.js, TanStack) are NOT included here, since they fire on generic
15
+ * JSX and would false-positive in other frameworks
16
+ *
17
+ * For Next.js or TanStack, extend ultracite/oxlint/next/js-plugins or
18
+ * ultracite/oxlint/tanstack/js-plugins alongside this preset
19
+ *
20
+ * @example
21
+ * npm install -D eslint-plugin-github eslint-plugin-sonarjs oxlint-plugin-react-doctor
22
+ * import { defineConfig } from "oxlint";
23
+ * import core from "ultracite/oxlint/core";
24
+ * import jsPlugins, { jsPluginSettings } from "ultracite/oxlint/js-plugins";
25
+ * export default defineConfig({
26
+ * extends: [core, jsPlugins],
27
+ * ignorePatterns: core.ignorePatterns,
28
+ * jsPlugins: jsPlugins.jsPlugins,
29
+ * settings: jsPluginSettings,
30
+ * });
31
+ *
32
+ * `jsPlugins: jsPlugins.jsPlugins` re-declares the plugin packages on the
33
+ * root config: oxlint loads them from the extended preset either way, but
34
+ * dependency analyzers such as Knip only read `jsPlugins` off the root and
35
+ * would otherwise flag the packages as unused (#784)
36
+ *
37
+ * To enable only some of the plugins, extend selectJsPlugins(...) instead of
38
+ * the full preset, and see its doc comment below
39
+ */
1
40
  declare const jsPluginEntries: readonly [{
2
41
  readonly name: "github";
3
42
  readonly specifier: "eslint-plugin-github";
@@ -15,6 +54,25 @@ declare const jsPluginEntries: readonly [{
15
54
  readonly specifier: string;
16
55
  }];
17
56
  type JSPluginName = (typeof jsPluginEntries)[number]["name"];
57
+ /**
58
+ * react-doctor 0.9.x rewrote its ported oxc/react-refresh rules (notably
59
+ * only-export-components) with a stripped-down default mode: no framework
60
+ * detection, no route-file skipping, and allowConstantExport off, so Next.js
61
+ * route-segment exports (`export const dynamic = ...`, metadata, etc.)
62
+ * false-positive in every route file (#771). "curated" restores the
63
+ * framework-aware behavior these rule selections were curated against.
64
+ *
65
+ * oxlint does not merge `settings` from extended configs, so this preset
66
+ * carrying the settings is not enough, so they must land on the root config:
67
+ *
68
+ * export default defineConfig({
69
+ * extends: [core, jsPlugins],
70
+ * ignorePatterns: core.ignorePatterns,
71
+ * settings: jsPluginSettings,
72
+ * });
73
+ *
74
+ * `ultracite init` wires this into generated configs automatically.
75
+ */
18
76
  export declare const jsPluginSettings: {
19
77
  "react-doctor": {
20
78
  portedRuleMode: string;
@@ -25,18 +83,54 @@ declare const config: {
25
83
  name: string;
26
84
  specifier: string;
27
85
  }[];
86
+ /**
87
+ * Inert until oxlint merges settings from extends; the root config applies
88
+ * jsPluginSettings itself (see above)
89
+ */
28
90
  settings: {
29
91
  "react-doctor": {
30
92
  portedRuleMode: string;
31
93
  };
32
94
  };
33
- overrides: {
95
+ overrides: ({
34
96
  files: string[];
35
97
  rules: {
98
+ /**
99
+ * Repeated string literals (test titles, expected values) are normal
100
+ * and idiomatic in test files
101
+ */
36
102
  "sonarjs/no-duplicate-string": "off";
103
+ "lazuee/no-ts-accessibility"?: undefined;
104
+ "lazuee/interface-pascal-case"?: undefined;
105
+ "lazuee/canonical-header-names"?: undefined;
37
106
  };
38
- }[];
107
+ } | {
108
+ files: string[];
109
+ rules: {
110
+ /**
111
+ * Repeated string literals (test titles, expected values) are normal
112
+ * and idiomatic in test files
113
+ */
114
+ "sonarjs/no-duplicate-string"?: undefined;
115
+ "lazuee/no-ts-accessibility": "error";
116
+ "lazuee/interface-pascal-case": "error";
117
+ "lazuee/canonical-header-names"?: undefined;
118
+ };
119
+ } | {
120
+ files: string[];
121
+ rules: {
122
+ /**
123
+ * Repeated string literals (test titles, expected values) are normal
124
+ * and idiomatic in test files
125
+ */
126
+ "sonarjs/no-duplicate-string"?: undefined;
127
+ "lazuee/no-ts-accessibility"?: undefined;
128
+ "lazuee/interface-pascal-case"?: undefined;
129
+ "lazuee/canonical-header-names": "off";
130
+ };
131
+ })[];
39
132
  rules: {
133
+ /** ── github ───────────────────────────────────────────────────────── */
40
134
  "github/a11y-aria-label-is-well-formatted": "error";
41
135
  "github/a11y-no-title-attribute": "error";
42
136
  "github/a11y-no-visually-hidden-interactive-element": "error";
@@ -51,8 +145,13 @@ declare const config: {
51
145
  "github/js-class-name": "error";
52
146
  "github/no-blur": "error";
53
147
  "github/no-d-none": "error";
148
+ /** Conflicts with unicorn/prefer-dom-node-dataset, which is the benchmark */
54
149
  "github/no-dataset": "off";
55
150
  "github/no-dynamic-script-tag": "error";
151
+ /**
152
+ * The JS plugin bridge misreads module-scoped declarations (e.g. Astro
153
+ * frontmatter) as implicit globals, producing false positives.
154
+ */
56
155
  "github/no-implicit-buggy-globals": "off";
57
156
  "github/no-inner-html": "error";
58
157
  "github/no-innerText": "error";
@@ -60,9 +159,11 @@ declare const config: {
60
159
  "github/no-useless-passive": "error";
61
160
  "github/prefer-observers": "error";
62
161
  "github/require-passive-events": "error";
162
+ /** Mirrors the ESLint preset */
63
163
  "github/unescaped-html-literal": "off";
64
164
  "sonarjs/arguments-usage": "error";
65
165
  "sonarjs/array-constructor": "error";
166
+ /** Fights the formatter (arrowParentheses: always) */
66
167
  "sonarjs/arrow-function-convention": "off";
67
168
  "sonarjs/aws-apigateway-public-api": "error";
68
169
  "sonarjs/aws-ec2-rds-dms-public": "error";
@@ -88,6 +189,7 @@ declare const config: {
88
189
  "sonarjs/chai-determinate-assertion": "error";
89
190
  "sonarjs/class-name": "error";
90
191
  "sonarjs/code-eval": "error";
192
+ /** Matches Biome's noExcessiveCognitiveComplexity limit */
91
193
  "sonarjs/cognitive-complexity": ["error", number];
92
194
  "sonarjs/comma-or-logical-or-case": "error";
93
195
  "sonarjs/comment-regex": "error";
@@ -97,15 +199,22 @@ declare const config: {
97
199
  "sonarjs/cookie-no-httponly": "error";
98
200
  "sonarjs/cors": "error";
99
201
  "sonarjs/csrf": "error";
202
+ /** Duplicate of the core complexity rule */
100
203
  "sonarjs/cyclomatic-complexity": "off";
101
204
  "sonarjs/declarations-in-global-scope": "error";
102
205
  "sonarjs/destructuring-assignment-syntax": "error";
103
206
  "sonarjs/disabled-timeout": "error";
104
207
  "sonarjs/dynamically-constructed-templates": "error";
208
+ /** Mirrors the ESLint preset */
105
209
  "sonarjs/elseif-without-else": "off";
106
210
  "sonarjs/encryption-secure-mode": "error";
107
211
  "sonarjs/expression-complexity": "error";
212
+ /** Requires a headerFormat option; errors on every file without one */
108
213
  "sonarjs/file-header": "off";
214
+ /**
215
+ * Fires on any file whose name differs from an exported class, which is
216
+ * noise for config and module files that export objects, not classes
217
+ */
109
218
  "sonarjs/file-name-differ-from-class": "off";
110
219
  "sonarjs/file-permissions": "error";
111
220
  "sonarjs/file-uploads": "error";
@@ -124,11 +233,14 @@ declare const config: {
124
233
  "sonarjs/inverted-assertion-arguments": "error";
125
234
  "sonarjs/label-position": "error";
126
235
  "sonarjs/link-with-target-blank": "error";
236
+ /** The preset disables max-lines everywhere */
127
237
  "sonarjs/max-lines": "off";
238
+ /** The preset disables max-lines-per-function everywhere */
128
239
  "sonarjs/max-lines-per-function": "off";
129
240
  "sonarjs/max-switch-cases": "error";
130
241
  "sonarjs/max-union-size": "error";
131
242
  "sonarjs/misplaced-loop-counter": "error";
243
+ /** Duplicate of max-depth, which is off */
132
244
  "sonarjs/nested-control-flow": "off";
133
245
  "sonarjs/no-all-duplicated-branches": "error";
134
246
  "sonarjs/no-angular-bypass-sanitization": "error";
@@ -162,6 +274,10 @@ declare const config: {
162
274
  "sonarjs/no-identical-expressions": "error";
163
275
  "sonarjs/no-identical-functions": "error";
164
276
  "sonarjs/no-ignored-exceptions": "error";
277
+ /**
278
+ * The JS plugin bridge has no dependency-manifest resolution, so this
279
+ * flags builtin (bun:test) and workspace imports as missing dependencies
280
+ */
165
281
  "sonarjs/no-implicit-dependencies": "off";
166
282
  "sonarjs/no-implicit-global": "error";
167
283
  "sonarjs/no-incomplete-assertions": "error";
@@ -183,6 +299,7 @@ declare const config: {
183
299
  "sonarjs/no-redundant-assignments": "error";
184
300
  "sonarjs/no-redundant-boolean": "error";
185
301
  "sonarjs/no-redundant-jump": "error";
302
+ /** The jsPlugins bridge provides no globals, so every identifier is flagged */
186
303
  "sonarjs/no-reference-error": "off";
187
304
  "sonarjs/no-referrer-policy": "error";
188
305
  "sonarjs/no-same-argument-assert": "error";
@@ -221,6 +338,7 @@ declare const config: {
221
338
  "sonarjs/redundant-type-aliases": "error";
222
339
  "sonarjs/review-blockchain-mnemonic": "error";
223
340
  "sonarjs/session-regeneration": "error";
341
+ /** Conflicts with sort-keys */
224
342
  "sonarjs/shorthand-property-grouping": "off";
225
343
  "sonarjs/stable-tests": "error";
226
344
  "sonarjs/stateful-regex": "error";
@@ -239,6 +357,7 @@ declare const config: {
239
357
  "sonarjs/weak-ssl": "error";
240
358
  "sonarjs/x-powered-by": "error";
241
359
  "sonarjs/xml-parser-xxe": "error";
360
+ /** Generic React rules */
242
361
  "react-doctor/activity-wraps-effect-heavy-subtree": "error";
243
362
  "react-doctor/advanced-event-handler-refs": "error";
244
363
  "react-doctor/async-await-in-loop": "error";
@@ -344,6 +463,7 @@ declare const config: {
344
463
  "react-doctor/no-uncontrolled-input": "error";
345
464
  "react-doctor/no-undeferred-third-party": "error";
346
465
  "react-doctor/no-usememo-simple-expression": "error";
466
+ /** "react-doctor/only-export-components": "error", */
347
467
  "react-doctor/prefer-dynamic-import": "error";
348
468
  "react-doctor/prefer-explicit-variants": "error";
349
469
  "react-doctor/prefer-html-dialog": "error";
@@ -387,6 +507,13 @@ declare const config: {
387
507
  "react-doctor/zod-v4-no-deprecated-error-customization": "error";
388
508
  "react-doctor/zod-v4-no-deprecated-schema-apis": "error";
389
509
  "react-doctor/zod-v4-prefer-top-level-string-formats": "error";
510
+ /**
511
+ * Full-ruleset parity adjustments: rules the react-doctor CLI ships
512
+ * disabled by default (defaultEnabled: false) that only produce noise
513
+ * when oxlint force-enables every listed rule, and rules the CLI gates
514
+ * behind framework detection (`nextjs`, `pure-preact`) that this
515
+ * Bun + Hono + react-router app never satisfies
516
+ */
390
517
  "react-doctor/react-in-jsx-scope": "off";
391
518
  "react-doctor/jsx-boolean-value": "off";
392
519
  "react-doctor/jsx-handler-names": "off";
@@ -395,24 +522,62 @@ declare const config: {
395
522
  "react-doctor/nextjs-no-a-element": "off";
396
523
  "react-doctor/nextjs-no-img-element": "off";
397
524
  "react-doctor/preact-no-react-hooks-import": "off";
525
+ /**
526
+ * Small presentational helpers stay colocated in one file (see
527
+ * src/components/api-tester.tsx); mirrors `react/no-multi-comp` being off
528
+ * in the presets
529
+ */
398
530
  "react-doctor/no-multi-comp": "off";
399
531
  "react-doctor/no-multi-component-file": "off";
532
+ /** src/router.tsx exports the router object rather than a component */
400
533
  "react-doctor/only-export-components": "off";
534
+ /**
535
+ * ── tailwindcss ────────────────────────────────────────────────────
536
+ * Correctness: catch real bugs
537
+ */
401
538
  "tailwindcss/no-conflicting-classes": "error";
402
539
  "tailwindcss/no-deprecated-classes": "error";
403
540
  "tailwindcss/no-duplicate-classes": "warn";
404
541
  "tailwindcss/no-unknown-classes": "error";
542
+ /** Modernization: keep classes in current canonical form */
405
543
  "tailwindcss/enforce-canonical": "warn";
406
544
  "tailwindcss/no-unnecessary-arbitrary-value": "warn";
545
+ /** Style and consistency */
407
546
  "tailwindcss/enforce-sort-order": "warn";
408
547
  "tailwindcss/consistent-variant-order": "warn";
409
548
  "tailwindcss/enforce-consistent-important-position": "warn";
410
549
  "tailwindcss/no-unnecessary-whitespace": "warn";
550
+ /** ── lazuee ──────────────────────────────────────────────────── */
411
551
  "lazuee/prefer-alias": "error";
552
+ "lazuee/no-ts-accessibility": "off";
553
+ "lazuee/interface-pascal-case": "off";
554
+ "lazuee/canonical-header-names": "off";
412
555
  };
413
556
  };
414
557
  export default config;
558
+ /**
559
+ * Returns a copy of this preset narrowed to the given plugin names ("github",
560
+ * "sonarjs", "react-doctor"): only the selected jsPlugins entries are loaded
561
+ * and only their rules (top-level and per-override) are kept. `ultracite init`
562
+ * wires this into generated configs when a subset of the plugins is chosen,
563
+ * so the generated file stays a one-line extend instead of inlining the
564
+ * filtering logic:
565
+ *
566
+ * import { selectJsPlugins } from "ultracite/oxlint/js-plugins";
567
+ *
568
+ * const jsPlugins = selectJsPlugins(["github", "sonarjs"]);
569
+ *
570
+ * export default defineConfig({
571
+ * extends: [core, jsPlugins],
572
+ * ignorePatterns: core.ignorePatterns,
573
+ * jsPlugins: jsPlugins.jsPlugins,
574
+ * });
575
+ */
415
576
  export declare const selectJsPlugins: (pluginNames: JSPluginName[]) => {
577
+ /**
578
+ * Inert until oxlint merges settings from extends; the root config applies
579
+ * jsPluginSettings itself (see above)
580
+ */
416
581
  settings: {
417
582
  "react-doctor": {
418
583
  portedRuleMode: string;
@@ -434,12 +599,22 @@ export declare const selectJsPlugins: (pluginNames: JSPluginName[]) => {
434
599
  readonly name: "lazuee";
435
600
  readonly specifier: string;
436
601
  })[];
437
- overrides: {
602
+ overrides: ({
438
603
  files: string[];
439
604
  rules: {
440
- [k: string]: "off";
605
+ [k: string]: any;
441
606
  };
442
- }[];
607
+ } | {
608
+ files: string[];
609
+ rules: {
610
+ [k: string]: any;
611
+ };
612
+ } | {
613
+ files: string[];
614
+ rules: {
615
+ [k: string]: any;
616
+ };
617
+ })[];
443
618
  rules: {
444
619
  [k: string]: "error" | "off" | "warn" | ["error", number];
445
620
  };
@@ -2,7 +2,7 @@ import {
2
2
  jsPluginSettings,
3
3
  js_plugins_default,
4
4
  selectJsPlugins
5
- } from "../../../../chunk-1chg07xf.js";
5
+ } from "../../../../chunk-fqcw0kzp.js";
6
6
  import"../../../../chunk-5wgwscd0.js";
7
7
  export {
8
8
  js_plugins_default as default,
@@ -0,0 +1,19 @@
1
+ export declare const noCommentSlopConfig: {
2
+ jsPlugins: {
3
+ name: string;
4
+ specifier: string;
5
+ }[];
6
+ rules: {
7
+ "no-comment-slop/max-comment-lines": "error";
8
+ "no-comment-slop/no-banner-comment": "error";
9
+ "no-comment-slop/no-trailing-comment": "error";
10
+ "no-comment-slop/prefer-jsdoc-for-exports": "error";
11
+ "no-comment-slop/prefer-jsdoc-for-members": "error";
12
+ "no-comment-slop/require-member-docs": "error";
13
+ "no-comment-slop/multiline-jsdoc-format": "error";
14
+ "no-comment-slop/no-trailing-period": "error";
15
+ "no-comment-slop/no-em-dash": "error";
16
+ "no-comment-slop/no-jargon": "error";
17
+ "no-comment-slop/no-foreign-syntax": "error";
18
+ };
19
+ };
@@ -0,0 +1,7 @@
1
+ import {
2
+ noCommentSlopConfig
3
+ } from "../../../../chunk-97s6xvc6.js";
4
+ import"../../../../chunk-5wgwscd0.js";
5
+ export {
6
+ noCommentSlopConfig
7
+ };