You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Wiring note: this plugin is enabled via an `overrides` entry in biome.json
18
+
// that INCLUDES source globs and negates test globs — it is NOT enabled at the
19
+
// top level. Biome applies top-level `plugins` to every file, and
20
+
// `overrides[].plugins: []` does NOT disable them, so "enable globally + exempt
21
+
// tests" silently lints tests too. Scoping the plugin in via the override is the
22
+
// only way to exempt test doubles (which legitimately force-cast).
23
+
or {
24
+
`$e as any`,
25
+
`$e as never`,
26
+
`$e as unknown`
27
+
} where {
28
+
register_diagnostic(
29
+
span = $e,
30
+
message = "Avoid type-erasing assertions (`as any` / `as never` / `as unknown`) — they silence the checker instead of narrowing. Fix the underlying type, use a type guard, or assert a specific type. Suppress an intentional case with `// biome-ignore lint/plugin: <reason>`.",
0 commit comments