Home  >  Article  >  Development Tools  >  How vscode uses eslint

How vscode uses eslint

王林
王林Original
2020-04-05 13:17:504055browse

How vscode uses eslint

1. Install the eslint plug-in in vs

2. Install eslint globally with npm

sudo npm i -g eslint

3. Run eslint on the vs terminal --init

4. Set it in vscode’s setting

"eslint.autoFixOnSave": true,

5. It’s ready to use.

Supplement: Commonly used methods to turn off eslint

1. Turn off paragraph verification

/* eslint-disable */some code
some code
/* eslint-enable */

2. Turn off current line verification

some code // eslint-disable-line

3. Turn off the next line Verification

// eslint-disable-next-line
some code

Recommended related tutorials: vscode tutorial

The above is the detailed content of How vscode uses eslint. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn