最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Eslint: --fix not resolving warnings according to .eslintrc rules - Stack Overflow

programmeradmin3浏览0评论

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 badges
Add a ment  | 

1 Answer 1

Reset to default 12

ESLint --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.

发布评论

评论列表(0)

  1. 暂无评论