Autofix (--fix) violations of `argsIgnorePattern`
See original GitHub issueI just enforced the pattern for unused args and that yielded errors on more than 200 files. Although the changes are trivial, that’s a lot of files and each change will be a chance of introducing bugs.
So I wonder if that could be an improvement to the --fix
option, at least the most common cases such as the patterns that describe a prefix (i.e. "argsIgnorePattern": "^_"
).
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
eslint/eslint - Gitter
I'm newbie here, i just want to ask how to solve this error. error - ESLint: Whitespace found in plugin name ' @typescript-eslint'....
Read more >ESLint not working in VS Code? - Stack Overflow
ESLint extension was enabled and .eslintrc file had some rules but VS Code did not show any autofix for my code. The problem...
Read more >sombochea/gitea - gitea - CUBETIQ Git Repository
fix lessc and postcss plugins * check for node_modules and use actual bin ... mostly focused on shorter code - autofix new lint...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I personally see unused variables as a possible error, and wouldn’t like the core rule to auto-fix and hide errors.
3d party plugin could be used just as a utility to fix the existing codebase (if you trust that already existing unused variables are not errors) before enabling the core rule.
Perhaps a 3rd party plugin like eslint-plugin-autofix could help.
A recent modification in this PR looks like your example.