Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No ESLint configuration found for Visual Studio Code

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:

enter image description here

enter image description here

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

like image 573
santosh kumar patro Avatar asked Aug 03 '16 14:08

santosh kumar patro


People also ask

How do I enable ESLint in VSCode?

Configure VSCode Settings to use ESLint for FormattingClick that tiny icon in the top-right that looks like a piece of paper with a little arrow. The first one turns on ESLint for formatting, and the next 3 make it do the formatting when you hit save. That should do it! Save the settings file and close it, we're done.

Why is VSCode not showing ESLint?

Take a look at the output panel in VSCodeOpen the command palette by pressing Ctrl / Cmd + Shift + P and select 'ESLint: Show Output Channel'. If ESLint throws any errors, they should appear here. That's always a good starting point for further debugging.

How do I fix ESLint issues in VSCode?

If you have the ESLint extension installed you can use CTRL+SHIFT+P to open the Command Palette. Then search for ESLint: Fix all auto-fixable Problems and press ENTER (or RETURN ). You are free from counting indentation and checking for quotation marks and semicolons!


1 Answers

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
like image 52
Dauren Akilbekov Avatar answered Sep 19 '22 17:09

Dauren Akilbekov