oxlint-config-awesomeness 3.4.1 → 3.4.2
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/index.js +18 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -618,10 +618,14 @@ export default defineConfig({
|
|
|
618
618
|
|
|
619
619
|
// `x as unknown as T` launders any value into any type.
|
|
620
620
|
"anti-slop/no-chained-type-assertions": "error",
|
|
621
|
-
// `...(cond ? {} :
|
|
622
|
-
|
|
623
|
-
//
|
|
624
|
-
"anti-slop/no-
|
|
621
|
+
// Warn, not error: `...(cond ? { key } : {})` is how an optional key is
|
|
622
|
+
// omitted in Next config objects and Better Auth options, where the
|
|
623
|
+
// alternative (build the object in separate statements) reads worse.
|
|
624
|
+
"anti-slop/no-conditional-empty-object-spread": "warn",
|
|
625
|
+
// Warn, not error: fires on `const X: Record<Union, string> = {...}` lookup
|
|
626
|
+
// tables and on named-shape return annotations, which are deliberate
|
|
627
|
+
// contracts here rather than laundered types. 76 sites across four repos.
|
|
628
|
+
"anti-slop/no-known-value-widening": "warn",
|
|
625
629
|
// `object` on inputs accepts nearly everything; name the expected fields.
|
|
626
630
|
"anti-slop/no-object-parameters": "error",
|
|
627
631
|
// Flags every `typeof` unary, including the `typeof window` SSR guards the
|
|
@@ -637,8 +641,10 @@ export default defineConfig({
|
|
|
637
641
|
"anti-slop/no-unknown-parameters": "warn",
|
|
638
642
|
// `type X = unknown` hides the escape hatch behind a domain-sounding name.
|
|
639
643
|
"anti-slop/no-unknown-type-aliases": "error",
|
|
640
|
-
//
|
|
641
|
-
|
|
644
|
+
// Warn, not error: `Record<string, unknown>` is the correct type at a real
|
|
645
|
+
// boundary (structured log context, a recursive deep-merge input), and the
|
|
646
|
+
// rule cannot tell those from a lazy escape hatch.
|
|
647
|
+
"anti-slop/no-unsafe-dictionary-type": "warn",
|
|
642
648
|
// Widening a known value and asserting it back is a two-step type lie.
|
|
643
649
|
"anti-slop/no-widen-then-assert": "error",
|
|
644
650
|
|
|
@@ -646,7 +652,12 @@ export default defineConfig({
|
|
|
646
652
|
|
|
647
653
|
// Comments longer than 5 lines narrate instead of inform. Directive
|
|
648
654
|
// comments (eslint-/oxlint-/@ts-) and license headers are exempt.
|
|
649
|
-
|
|
655
|
+
//
|
|
656
|
+
// Warn, not error: length is a proxy for narration, and after a comment
|
|
657
|
+
// sweep the long survivors are the load-bearing ones (external-system
|
|
658
|
+
// behavior, e2e helper contracts). Blocking a build on prose is the wrong
|
|
659
|
+
// trade; the warning still surfaces every one of them.
|
|
660
|
+
"awesomeness/no-novel-comments": "warn",
|
|
650
661
|
|
|
651
662
|
// React Doctor (react-doctor): original diagnostic rules at upstream severities
|
|
652
663
|
// (warn = advisory, error = definite bug). Excluded on purpose: the ports of
|