Guilherme Lemmi
Guilherme Lemmi

Reputation: 3487

Disable ESLint for webpack.config.js file on Visual Studio Code

I'm using Visual Studio Code with the vscode-eslint extension but I'm getting warnings for the webpack.config.js file itself, as shown below.

enter image description here

How can I disable the eslint verification for this file specifically and in my own workspace (that is, without adding an .eslintignore file to the repo that would affect other devs)?

Upvotes: 2

Views: 6630

Answers (2)

kewur
kewur

Reputation: 491

create a file called ".eslintignore" under your root directoy and add the file you want to ignore in it.

cd /path/to/project

touch .eslintignore
echo "webpack.config.js" >> .eslintignore

Upvotes: 0

Alex
Alex

Reputation: 67591

Add these lines to the VSCode settings.json:

"eslint.options": {
    "ignorePattern": "webpack.config.js",
}

Upvotes: 9

Related Questions