No ESLint configuration found for Visual Studio Code

∥☆過路亽.° 提交于 2021-02-18 22:10:58

问题


I have installed the ESLint plugin for Visual Studio Code editor and it shows that it is installed also but still I see the error: No ESLint configuration found for Visual Studio Code at the top of the editor window as shown in the screenshot below:

Can anyone help me to know is there anything that I am missing here.


回答1:


You are missing .eslintrc.* file. Which can be in different format js, json, yaml... There are two available methods to create configuration file

  • Manually, just create file and add rules
  • use init command $ ./node_modules/.bin/eslint --init or eslint --init if you have ESLint installed globally. Then follow instructions and after edit created file to your liking.

    More info:

  • http://eslint.org/docs/user-guide/configuring

  • https://github.com/eslint/eslint


来源:https://stackoverflow.com/questions/38747025/no-eslint-configuration-found-for-visual-studio-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!