Bun Lint Reports False prefer-readonly-parameter-types Findings Based on File Sharing
- Investigating(current)
- Trending(upcoming)
- Workaround available(upcoming)
- Resolved(upcoming)
Executive summary
Bun lint with typeAware = true produces inconsistent findings on the same code tree depending on which files share a checker. This causes false @typescript-eslint/prefer-readonly-parameter-types findings due to cached synthesized properties.
No verified workaround yet
None of the linked reports describe a mitigation. Follow this incident to hear when one appears.
Official fixget_undefined_property in src/sema/check/symbols.rs caches 1 synthesized property per name on the checker, retaining the READONLY flag of the first property that requested it.
Evidence
1 report · 1 GitHubShow
- [1]GitHub First reportbun lint reports a false prefer-readonly-parameter-types finding that depends on which files share a checker(opens GitHub issue in a new tab)
What happens bun lint with typeAware = true gives different findings on the same tree and the same flags. The extra finding is @typescript-eslint/prefer-readonly-parameter-types on the callback of an as const table whose rows have different property sets. get_undefined_property in src/sema/check/symbols.rs caches 1 synthesized property per name on the checker. The entry keeps the READONLY flag of the first property that asked for it. A mutable row earlier on the same checker therefore gives a…
by burak-bayir 0upvotes 0comments
Timeline
- First report on GitHub issue
bun lint reports a false prefer-readonly-parameter-types finding that depends on which files share a checker
Source