Home > Development Tools > VSCode > body text

How vscode uses eslint

王林
Release: 2020-04-05 13:17:50
Original
4050 people have browsed it

How vscode uses eslint

1. Install the eslint plug-in in vs

2. Install eslint globally with npm

sudo npm i -g eslint
Copy after login

3. Run eslint on the vs terminal --init

4. Set it in vscode’s setting

"eslint.autoFixOnSave": true,
Copy after login

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 */
Copy after login

2. Turn off current line verification

some code // eslint-disable-line
Copy after login

3. Turn off the next line Verification

// eslint-disable-next-line
some code
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template