sindresorhus/eslint-plugin-unicorn
prevent-abbreviations: when multiple replacements are defined, suggest each through ESLint's suggest API
Geschlossen
#767 geöffnet am 03.06.2020
enhancementhelp wanted
Repository-Metriken
- Stars
- (5.022 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 4h 30m) (26 gemergte PRs in 30 T)
Beschreibung
Currently, the prevent-abbreviations autofixer only applies when there is only a single replacement defined. But when multiple replacements are there (if the abbreviation is ambiguous) the violation has to be fixed manually.
It would be nice if the replacements were all suggested to the user in the editor/IDE to pick from. ESLint has the suggest API for this: https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions