Closed pauliesnug closed 3 months ago
I don't understand what you are proposing. It sounds like pretty out-of-scope, as in the end, this is just a shared config but not an entire integration
I don't understand what you are proposing. It sounds like pretty out-of-scope, as in the end, this is just a shared config but not an entire integration
Basically, the CLI would generate VSCode snippet autocompletion for the renamed rules/all added rules by the config. You can see the VSCode plugin that does this already, it's pretty simple, just a list of rule names which are autocompleted as part as the /* eslint-disable <rule-name> */
snippet.
Why would you ever use it over Quick Fix?
Oh I didn't consider that... Apologies
Clear and concise description of the problem
There already exists a VSCode plugin similar to this,
eslint-disable-snippets
, however this only supports builtin rules and is out of date. The VSCode plugin simply generates asnippets.json
file and adds it to the global VSCode configuration.I want to be able to have autocomplete snippets like this based on the rules enabled in
@antfu/eslint-config
.I think I can submit a preliminary PR at some point but am not sure.
Suggested solution
In the CLI module we could take the already autocompletable and auto generated
RuleOptions
type and simply map it to a VSCode snippets file, preferrably with a choice to add it to the.gitignore
file.We could also go one step further and generate a new
RuleOptions
type on runtime based on the rules that the user has actually enabled/added, as to not create unnecessary autocomplete options.Alternative
No response
Additional context
No response
Validations