问题
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
oreslint --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