cjholowatyj's avatar

Disabling Eslint on `npm run dev` ?

TL;DR How do I run npm run dev without it triggering eslint?

I recently started using Eslint to lint my Vue component code, but for some reason Eslint is not ignoring the node_modules folder, and it runs automatically with npm run dev despite me not wanting it to. I have a eslint script setup in my package.json file that I use to properly run eslint (which I run before npm run dev) and when I run eslint this way (i.e. npm run eslint - eslint settings omitted here for brevity) eslint runs properly and returns no errors, as I only want it run on the resources/js/* folder. I've tried everything I can think of and everything I've found on Google, to no avail... here are some of the things I've already tried...

/* Created an .eslintignore file with the following contents */
**/node_modules/**
node_modules
node_modules/*
node_modules/**
/* Added the following to my .eslintrc.json file*/
{
"ignoreDuringBuilds": true,
}
/* Added the following variable to my build scripts in package.json */
DISABLE_ESLINT_PLUGIN=true // ....npx mix, etc

My eslint package.json script that works perfectly for me is...

...
"eslint": "./node_modules/.bin/eslint --quiet --fix --ext .vue ./resources/js/*/*"
...

Thanks In Advance for any and all assistance!!!

0 likes
0 replies

Please or to participate in this conversation.