generated from JoshuaKGoldberg/create-typescript-app
-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Labels
status: needs investigationFurther research required...? πFurther research required...? πtype: featureNew enhancement or request πNew enhancement or request π
Milestone
Description
Feature Request Checklist
- I have pulled the latest
mainbranch of the repository. - I have searched for related issues and found none that matched my issue.
Overview
Linters these days seem to be split on how to handle fixes that change runtime behavior:
- A separate "suggestions" API, e.g. https://eslint.org/docs/latest/extend/custom-rules#providing-suggestions
- Marking fixes individually as "safe" or "unsafe", e.g. https://biomejs.dev/linter/#unsafe-fixes
I'm definitely leaning towards the latter to avoid having such separate concepts. There might actually be >=4 levels of fix safety?
- Cosmetic: does not change any runtime code, e.g. changing
Array<T>toT[] - Runtime-safe: changes runtime code in a way we're 99.9...% sure is safe, e.g. changing
object && object.atoobject?.a - Runtime-suggested: probably safe but needs manual confirmation, e.g. removing an unnecessary
asyncfrom a function - Opt-in: one of several options, e.g. adding a word to a spell checker dictionary
...but is that actually a cross-matrix? Should there be a delineation between "probably safe" (2.) between logical and stylistic rules, for example?
Design investigation work very much needed.
Additional Info
Blocked on #53: having a base concept of fixes. β
See also discussion in eslint/rfcs#134 around per-message(Id) configuration.
β€οΈβπ₯
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: needs investigationFurther research required...? πFurther research required...? πtype: featureNew enhancement or request πNew enhancement or request π