Closed polaroidkidd closed 2 years ago
I've tried running it with the --rule
flag, but it still asks me to confirm the rule and then asks me if I want to automatically fix it. Am I using it incorrectly, not seeing something or is this not a feature?
@polaroidkidd Yes you should be able to specify something like eslint-nibble . --non-interactive --rule semi
In order to run eslint against your code, using your project config, but only for the "semi" rule. If that's not working, can you share the full command that you are running?
Are you trying to automatically fix a particular rule? If so, https://github.com/IanVS/eslint-filtered-fix might be what you're looking for (it's what eslint-nibble uses under-the-hood).
yes, that's the end goal. Thanks for pointing eslint-filted-fix out! Closing this as it was a misunderstanding on my part. Thanks again!
Great, I hope that meets your needs, and let me know if you hit any other issues. Since you have such a large project, I'll point out I recently became aware of that https://github.com/mizdra/eslint-interactive, which it sounds like might have better performance than eslint-nibble (though maybe not eslint-filtered-fix). If you try that out, I'd be curious to hear your thoughts on it.
eslint-interactive has a feature called Programmable API. You can probably use it to do the same thing as eslint-filtered-fix (more flexible than eslint-filtered-fix, but the API is not as easy). If you need it, please see below.
oh, sweet! I passed this on to the team developing our internal react-scripts version as this tool greatly helps migrating the code base I'm managing to the new eslint rules.
Hi
--non-interactive
flag correctly. Does this mode allow me to specify a rule in the cli which nibble would auto-fix?I have a monorepo with 28 apps in it and navigating into every app one-at-a-time is a bit of pain. I've tried using the rule in combilation with the
--rule
flag but the desired outcome isn't quite there yet.