question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autofix (--fix) violations of `argsIgnorePattern`

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
mdjermanoviccommented, Aug 22, 2019

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.

1reaction
mdjermanoviccommented, Aug 21, 2019

Perhaps a 3rd party plugin like eslint-plugin-autofix could help.

A recent modification in this PR looks like your example.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found