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.
@@ -19,6 +19,7 @@ const overrideRules = {
19
19
  // Matches unicorn/no-process-exit being off in the oxlint config.
20
20
  "n/no-process-exit": "off",
21
21
  "n/no-sync": "off",
22
+ "n/no-unpublished-import": "off",
22
23
  "n/no-unsupported-features/es-builtins": "off",
23
24
  "n/no-unsupported-features/es-syntax": "off",
24
25
  "n/no-unsupported-features/node-builtins": "off",
@@ -17,20 +17,10 @@ export default defineConfig({
17
17
  ],
18
18
  rules: {
19
19
  "no-empty-function": "off",
20
- // Repeated string literals (test titles, expected values) are normal
21
- // and idiomatic in test files.
22
- "sonarjs/no-duplicate-string": "off",
23
20
  "promise/prefer-await-to-then": "off",
24
21
  },
25
22
  },
26
23
  ],
27
- // eslint-plugin-github and eslint-plugin-sonarjs run through oxlint's JS
28
- // plugin support to close the gap with the ESLint preset. Rules that require
29
- // type information are not supported by the JS plugin bridge and are excluded.
30
- jsPlugins: [
31
- { name: "github", specifier: "eslint-plugin-github" },
32
- { name: "sonarjs", specifier: "eslint-plugin-sonarjs" },
33
- ],
34
24
  plugins: [
35
25
  "eslint",
36
26
  "typescript",
@@ -180,6 +170,7 @@ export default defineConfig({
180
170
  "no-unmodified-loop-condition": "error",
181
171
  "no-unneeded-ternary": "error",
182
172
  "no-unreachable": "error",
173
+ "no-unreachable-loop": "error",
183
174
  "no-unsafe-finally": "error",
184
175
  "no-unsafe-negation": "error",
185
176
  "no-unsafe-optional-chaining": "error",
@@ -233,36 +224,6 @@ export default defineConfig({
233
224
  "vars-on-top": "error",
234
225
  yoda: "error",
235
226
 
236
- // ── github ─────────────────────────────────────────────────────────
237
- "github/a11y-aria-label-is-well-formatted": "error",
238
- "github/a11y-no-title-attribute": "error",
239
- "github/a11y-no-visually-hidden-interactive-element": "error",
240
- "github/a11y-role-supports-aria-props": "error",
241
- "github/a11y-svg-has-accessible-name": "error",
242
- "github/array-foreach": "error",
243
- "github/async-currenttarget": "error",
244
- "github/async-preventdefault": "error",
245
- "github/authenticity-token": "error",
246
- "github/filenames-match-regex": "error",
247
- "github/get-attribute": "error",
248
- "github/js-class-name": "error",
249
- "github/no-blur": "error",
250
- "github/no-d-none": "error",
251
- // Conflicts with unicorn/prefer-dom-node-dataset, which is the benchmark.
252
- "github/no-dataset": "off",
253
- "github/no-dynamic-script-tag": "error",
254
- // The JS plugin bridge misreads module-scoped declarations (e.g. Astro
255
- // frontmatter) as implicit globals, producing false positives.
256
- "github/no-implicit-buggy-globals": "off",
257
- "github/no-inner-html": "error",
258
- "github/no-innerText": "error",
259
- "github/no-then": "error",
260
- "github/no-useless-passive": "error",
261
- "github/prefer-observers": "error",
262
- "github/require-passive-events": "error",
263
- // Mirrors the ESLint preset.
264
- "github/unescaped-html-literal": "off",
265
-
266
227
  // ── import ─────────────────────────────────────────────────────────
267
228
  "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
268
229
  "import/default": "error",
@@ -376,207 +337,6 @@ export default defineConfig({
376
337
  "promise/spec-only": "error",
377
338
  "promise/valid-params": "error",
378
339
 
379
- // ── sonarjs ────────────────────────────────────────────────────────
380
- // These sonarjs rules exist in eslint-plugin-sonarjs but oxlint's JS
381
- // plugin bridge does not register them, so listing them fails config
382
- // parsing. They are intentionally omitted here (still enabled in the
383
- // ESLint preset): async-test-assertions, hooks-before-test-cases,
384
- // no-duplicate-test-title, no-empty-test-title, no-floating-point-equality,
385
- // no-forced-browser-interaction, no-trivial-assertions,
386
- // prefer-specific-assertions, super-linear-regex.
387
- "sonarjs/arguments-usage": "error",
388
- "sonarjs/array-constructor": "error",
389
- // Fights the formatter (arrowParentheses: always).
390
- "sonarjs/arrow-function-convention": "off",
391
- "sonarjs/aws-apigateway-public-api": "error",
392
- "sonarjs/aws-ec2-rds-dms-public": "error",
393
- "sonarjs/aws-ec2-unencrypted-ebs-volume": "error",
394
- "sonarjs/aws-efs-unencrypted": "error",
395
- "sonarjs/aws-iam-all-privileges": "error",
396
- "sonarjs/aws-iam-all-resources-accessible": "error",
397
- "sonarjs/aws-iam-privilege-escalation": "error",
398
- "sonarjs/aws-iam-public-access": "error",
399
- "sonarjs/aws-opensearchservice-domain": "error",
400
- "sonarjs/aws-rds-unencrypted-databases": "error",
401
- "sonarjs/aws-restricted-ip-admin-access": "error",
402
- "sonarjs/aws-s3-bucket-granted-access": "error",
403
- "sonarjs/aws-s3-bucket-insecure-http": "error",
404
- "sonarjs/aws-s3-bucket-public-access": "error",
405
- "sonarjs/aws-s3-bucket-versioning": "error",
406
- "sonarjs/aws-sagemaker-unencrypted-notebook": "error",
407
- "sonarjs/aws-sns-unencrypted-topics": "error",
408
- "sonarjs/aws-sqs-unencrypted-queue": "error",
409
- "sonarjs/block-scoped-var": "error",
410
- "sonarjs/bool-param-default": "error",
411
- "sonarjs/call-argument-line": "error",
412
- "sonarjs/chai-determinate-assertion": "error",
413
- "sonarjs/class-name": "error",
414
- "sonarjs/code-eval": "error",
415
- // Matches Biome's noExcessiveCognitiveComplexity limit.
416
- "sonarjs/cognitive-complexity": ["error", 20],
417
- "sonarjs/comma-or-logical-or-case": "error",
418
- "sonarjs/comment-regex": "error",
419
- "sonarjs/constructor-for-side-effects": "error",
420
- "sonarjs/content-length": "error",
421
- "sonarjs/content-security-policy": "error",
422
- "sonarjs/cookie-no-httponly": "error",
423
- "sonarjs/cors": "error",
424
- "sonarjs/csrf": "error",
425
- // Duplicate of the core complexity rule.
426
- "sonarjs/cyclomatic-complexity": "off",
427
- "sonarjs/declarations-in-global-scope": "error",
428
- "sonarjs/destructuring-assignment-syntax": "error",
429
- "sonarjs/disabled-timeout": "error",
430
- "sonarjs/dynamically-constructed-templates": "error",
431
- // Mirrors the ESLint preset.
432
- "sonarjs/elseif-without-else": "off",
433
- "sonarjs/encryption-secure-mode": "error",
434
- "sonarjs/expression-complexity": "error",
435
- // Requires a headerFormat option; errors on every file without one.
436
- "sonarjs/file-header": "off",
437
- // Fires on any file whose name differs from an exported class, which is
438
- // noise for config and module files that export objects, not classes.
439
- "sonarjs/file-name-differ-from-class": "off",
440
- "sonarjs/file-permissions": "error",
441
- "sonarjs/file-uploads": "error",
442
- "sonarjs/fixme-tag": "error",
443
- "sonarjs/for-in": "error",
444
- "sonarjs/for-loop-increment-sign": "error",
445
- "sonarjs/function-inside-loop": "error",
446
- "sonarjs/function-name": "error",
447
- "sonarjs/future-reserved-words": "error",
448
- "sonarjs/generator-without-yield": "error",
449
- "sonarjs/hardcoded-secret-signatures": "error",
450
- "sonarjs/hashing": "error",
451
- "sonarjs/inconsistent-function-call": "error",
452
- "sonarjs/insecure-cookie": "error",
453
- "sonarjs/insecure-jwt-token": "error",
454
- "sonarjs/inverted-assertion-arguments": "error",
455
- "sonarjs/label-position": "error",
456
- "sonarjs/link-with-target-blank": "error",
457
- // The preset disables max-lines everywhere.
458
- "sonarjs/max-lines": "off",
459
- // The preset disables max-lines-per-function everywhere.
460
- "sonarjs/max-lines-per-function": "off",
461
- "sonarjs/max-switch-cases": "error",
462
- "sonarjs/max-union-size": "error",
463
- "sonarjs/misplaced-loop-counter": "error",
464
- // Duplicate of max-depth, which is off.
465
- "sonarjs/nested-control-flow": "off",
466
- "sonarjs/no-all-duplicated-branches": "error",
467
- "sonarjs/no-angular-bypass-sanitization": "error",
468
- "sonarjs/no-built-in-override": "error",
469
- "sonarjs/no-case-label-in-switch": "error",
470
- "sonarjs/no-clear-text-protocols": "error",
471
- "sonarjs/no-code-after-done": "error",
472
- "sonarjs/no-collapsible-if": "error",
473
- "sonarjs/no-commented-code": "error",
474
- "sonarjs/no-dead-store": "error",
475
- "sonarjs/no-delete-var": "error",
476
- "sonarjs/no-duplicate-in-composite": "error",
477
- "sonarjs/no-duplicate-string": "error",
478
- "sonarjs/no-duplicated-branches": "error",
479
- "sonarjs/no-element-overwrite": "error",
480
- "sonarjs/no-empty-collection": "error",
481
- "sonarjs/no-empty-test-file": "error",
482
- "sonarjs/no-equals-in-for-termination": "error",
483
- "sonarjs/no-exclusive-tests": "error",
484
- "sonarjs/no-extra-arguments": "error",
485
- "sonarjs/no-fallthrough": "error",
486
- "sonarjs/no-function-declaration-in-block": "error",
487
- "sonarjs/no-global-this": "error",
488
- "sonarjs/no-globals-shadowing": "error",
489
- "sonarjs/no-gratuitous-expressions": "error",
490
- "sonarjs/no-hardcoded-ip": "error",
491
- "sonarjs/no-hardcoded-passwords": "error",
492
- "sonarjs/no-hardcoded-secrets": "error",
493
- "sonarjs/no-hook-setter-in-body": "error",
494
- "sonarjs/no-identical-conditions": "error",
495
- "sonarjs/no-identical-expressions": "error",
496
- "sonarjs/no-identical-functions": "error",
497
- "sonarjs/no-ignored-exceptions": "error",
498
- // The JS plugin bridge has no dependency-manifest resolution, so this
499
- // flags builtin (bun:test) and workspace imports as missing dependencies.
500
- "sonarjs/no-implicit-dependencies": "off",
501
- "sonarjs/no-implicit-global": "error",
502
- "sonarjs/no-incomplete-assertions": "error",
503
- "sonarjs/no-internal-api-use": "error",
504
- "sonarjs/no-invariant-returns": "error",
505
- "sonarjs/no-inverted-boolean-check": "error",
506
- "sonarjs/no-labels": "error",
507
- "sonarjs/no-literal-call": "error",
508
- "sonarjs/no-mime-sniff": "error",
509
- "sonarjs/no-nested-assignment": "error",
510
- "sonarjs/no-nested-conditional": "error",
511
- "sonarjs/no-nested-functions": "error",
512
- "sonarjs/no-nested-incdec": "error",
513
- "sonarjs/no-nested-switch": "error",
514
- "sonarjs/no-nested-template-literals": "error",
515
- "sonarjs/no-os-command-from-path": "error",
516
- "sonarjs/no-parameter-reassignment": "error",
517
- "sonarjs/no-primitive-wrappers": "error",
518
- "sonarjs/no-redundant-assignments": "error",
519
- "sonarjs/no-redundant-boolean": "error",
520
- "sonarjs/no-redundant-jump": "error",
521
- // The jsPlugins bridge provides no globals, so every identifier is flagged.
522
- "sonarjs/no-reference-error": "off",
523
- "sonarjs/no-referrer-policy": "error",
524
- "sonarjs/no-same-argument-assert": "error",
525
- "sonarjs/no-same-line-conditional": "error",
526
- "sonarjs/no-session-cookies-on-static-assets": "error",
527
- "sonarjs/no-skipped-tests": "error",
528
- "sonarjs/no-sonar-comments": "error",
529
- "sonarjs/no-table-as-layout": "error",
530
- "sonarjs/no-undefined-assignment": "error",
531
- "sonarjs/no-unenclosed-multiline-block": "error",
532
- "sonarjs/no-uniq-key": "error",
533
- "sonarjs/no-unthrown-error": "error",
534
- "sonarjs/no-unused-collection": "error",
535
- "sonarjs/no-unused-function-argument": "error",
536
- "sonarjs/no-unused-vars": "error",
537
- "sonarjs/no-use-of-empty-return-value": "error",
538
- "sonarjs/no-useless-catch": "error",
539
- "sonarjs/no-useless-increment": "error",
540
- "sonarjs/no-useless-react-setstate": "error",
541
- "sonarjs/no-variable-usage-before-declaration": "error",
542
- "sonarjs/no-weak-cipher": "error",
543
- "sonarjs/no-weak-keys": "error",
544
- "sonarjs/no-wildcard-import": "error",
545
- "sonarjs/non-existent-operator": "error",
546
- "sonarjs/object-alt-content": "error",
547
- "sonarjs/prefer-default-last": "error",
548
- "sonarjs/prefer-object-literal": "error",
549
- "sonarjs/prefer-promise-shorthand": "error",
550
- "sonarjs/prefer-single-boolean-return": "error",
551
- "sonarjs/prefer-type-guard": "error",
552
- "sonarjs/prefer-while": "error",
553
- "sonarjs/production-debug": "error",
554
- "sonarjs/pseudo-random": "error",
555
- "sonarjs/public-static-readonly": "error",
556
- "sonarjs/publicly-writable-directories": "error",
557
- "sonarjs/redundant-type-aliases": "error",
558
- "sonarjs/review-blockchain-mnemonic": "error",
559
- "sonarjs/session-regeneration": "error",
560
- // Conflicts with sort-keys.
561
- "sonarjs/shorthand-property-grouping": "off",
562
- "sonarjs/stable-tests": "error",
563
- "sonarjs/stateful-regex": "error",
564
- "sonarjs/strict-transport-security": "error",
565
- "sonarjs/table-header": "error",
566
- "sonarjs/table-header-reference": "error",
567
- "sonarjs/test-check-exception": "error",
568
- "sonarjs/todo-tag": "error",
569
- "sonarjs/too-many-break-or-continue-in-loop": "error",
570
- "sonarjs/unverified-certificate": "error",
571
- "sonarjs/unverified-hostname": "error",
572
- "sonarjs/updated-const-var": "error",
573
- "sonarjs/updated-loop-counter": "error",
574
- "sonarjs/use-type-alias": "error",
575
- "sonarjs/variable-name": "error",
576
- "sonarjs/weak-ssl": "error",
577
- "sonarjs/x-powered-by": "error",
578
- "sonarjs/xml-parser-xxe": "error",
579
-
580
340
  // ── typescript ─────────────────────────────────────────────────────
581
341
  "typescript/adjacent-overload-signatures": "error",
582
342
  "typescript/array-type": "error",
@@ -700,6 +460,7 @@ export default defineConfig({
700
460
  "unicorn/error-message": "error",
701
461
  "unicorn/escape-case": "error",
702
462
  "unicorn/explicit-length-check": "off",
463
+ "unicorn/explicit-timer-delay": "error",
703
464
  "unicorn/filename-case": "error",
704
465
  "unicorn/import-style": "error",
705
466
  "unicorn/max-nested-calls": "off",
@@ -716,6 +477,7 @@ export default defineConfig({
716
477
  "unicorn/no-array-sort": "error",
717
478
  "unicorn/no-await-expression-member": "error",
718
479
  "unicorn/no-await-in-promise-methods": "error",
480
+ "unicorn/no-confusing-array-with": "error",
719
481
  "unicorn/no-console-spaces": "error",
720
482
  "unicorn/no-document-cookie": "error",
721
483
  "unicorn/no-empty-file": "error",
@@ -0,0 +1,5 @@
1
+ import type { OxlintConfig } from "oxlint";
2
+
3
+ declare const config: OxlintConfig;
4
+
5
+ export default config;