sindresorhus/eslint-plugin-unicorn
prevent-abbreviations: when multiple replacements are defined, suggest each through ESLint's suggest API
クローズ
#767 opened on 2020/06/03
enhancementhelp wanted
Repository metrics
- Stars
- (5,022 個のスター)
- PR merge metrics
- (平均マージ 4h 30m) (30d で 26 merged PRs)
説明
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