I am trying to auto-fix issues in my js file using
eslint --fix -c "/path/to/.eslintrc" <file-name.js>
but with no success. Went through Eslint Rules. I have to fix "no-undef" & "no-unused-vars" using the mand, but it still not works.
I am trying to auto-fix issues in my js file using
eslint --fix -c "/path/to/.eslintrc" <file-name.js>
but with no success. Went through Eslint Rules. I have to fix "no-undef" & "no-unused-vars" using the mand, but it still not works.
Share Improve this question asked Dec 25, 2017 at 10:19 PrashoorPrashoor 4281 gold badge4 silver badges9 bronze badges1 Answer
Reset to default 12ESLint --fix
will fix everything that it can fix, but in many cases won't be able to automatically follow every rule.
Rules that can be taken care of with --fix
can be found in the rules documentation - they'll have a wrench icon next to the rule name.
Looks like the no-undef
and no-unused-vars
rules don't, so you'll have to manually b through the warnings and manually modify the code.