Edit your package.json
to add the following script :
{
"scripts": {
"lint": "eslint .;exit 0"
}
}
Then run it using npm run lint
We use exit 0
as a trick to gracefully terminate the script when linting fails, otherwise npm
will use eslint
return code and crash.