biomejs
biome
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(lint): noMisleadingReturnType false positive on union with exhausted boolean Add `GLOBAL_BOOLEAN_ID` so the `boolean` keyword is a predefined global type, alongside `GLOBAL_NUMBER_ID` and `GLOBAL_STRING_ID`. Expose `Type::with_id` so a `Type` can be reframed against a different global ID while reusing its resolver. `TypeData::union_of` collapses `true | false` to the `boolean` keyword during inference. The signature takes `&mut dyn TypeResolver` so it can register the boolean keyword if neither variant is already present. The lint rule canonicalizes its per-return type vec in place: a `true`/`false` literal pair is replaced with a single boolean reference (via `Type::with_id(GLOBAL_BOOLEAN_ID)`). The downstream wider-than checks then see the canonical form, so the bare-`boolean` shortcut and the duplicated boolean-exhaustion logic both disappear.
minseong0324:fix/no-misleading-return-type-boolean-union
4 minutes ago
fix(lint): noMisleadingReturnType false positive on union with exhausted boolean `TypeData::union_of` now collapses `true | false` to the `boolean` keyword when building unions in inference. Boolean has only two values, so the literal pair already exhausts the keyword; the same does not hold for `string` or `number`, whose literal sets are infinite. The signature takes `&mut dyn TypeResolver` so it can register the boolean keyword when neither variant is already present. The lint rule consolidates the two boolean-exhaustion shortcuts (bare `boolean` annotation and `boolean` variant inside a union annotation) behind a single `returns_exhaust_boolean` helper. The result: returns collected per-statement bypass `union_of`, but the wider-than checks treat them as if the literals had been canonicalized.
minseong0324:fix/no-misleading-return-type-boolean-union
3 hours ago
fix(lint): noMisleadingReturnType false positive on union with exhausted boolean `TypeData::union_of` now collapses `true | false` to the `boolean` keyword when building unions in inference. Boolean has only two values, so the literal pair already exhausts the keyword; the same does not hold for `string` or `number`, whose literal sets are infinite. The signature takes `&mut dyn TypeResolver` so it can register the boolean keyword when neither variant is already present. The lint rule consolidates the two boolean-exhaustion shortcuts (bare `boolean` annotation and `boolean` variant inside a union annotation) behind a single `returns_exhaust_boolean` helper. The result: returns collected per-statement bypass `union_of`, but the wider-than checks treat them as if the literals had been canonicalized.
minseong0324:fix/no-misleading-return-type-boolean-union
3 hours ago
fix(lint): noMisleadingReturnType false positive on union with exhausted boolean When a union return type contains a `boolean` variant and the function returns both `true` and `false`, the variant is exhausted by the literal returns and is not actually wider. Skip it when checking for wider variants in `is_union_wider_than_returns`.
minseong0324:fix/no-misleading-return-type-boolean-union
5 hours ago
fix(lint): noMisleadingReturnType false positive on union with exhausted boolean When a union return type contains a `boolean` variant and the function returns both `true` and `false`, the variant is exhausted by the literal returns and is not actually wider. Skip it when checking for wider variants in `is_union_wider_than_returns`.
minseong0324:fix/no-misleading-return-type-boolean-union
5 hours ago
fix tests
Netail:feat/no-unnormalized-object-keys
10 hours ago
Merge branch 'main' into feat/no-unnormalized-object-keys
Netail:feat/no-unnormalized-object-keys
10 hours ago
Merge branch 'main' into feat/no-unsafe-values
Netail:feat/no-unsafe-values
12 hours ago
Latest Branches
CodSpeed Performance Gauge
0%
fix(lint): noMisleadingReturnType false positive on union with exhausted boolean
#10115
5 hours ago
6fb1b62
minseong0324:fix/no-misleading-return-type-boolean-union
CodSpeed Performance Gauge
0%
feat(json_analyze): implement noUnnormalizedObjectKeys
#9797
10 hours ago
2119f62
Netail:feat/no-unnormalized-object-keys
CodSpeed Performance Gauge
-44%
feat(json_analyze): implement noUnsafeValues
#9758
12 hours ago
5a3e353
Netail:feat/no-unsafe-values
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs