Skip to content

Instantly share code, notes, and snippets.

@nashid
Last active March 26, 2022 02:04
Show Gist options
  • Select an option

  • Save nashid/7bd50eb284b017c192c199cdc806c1c6 to your computer and use it in GitHub Desktop.

Select an option

Save nashid/7bd50eb284b017c192c199cdc806c1c6 to your computer and use it in GitHub Desktop.
Running eslint in command line

running eslint

#install eslint in project
npm install eslint --save-dev

#initialize in root folder
node_modules/.bin/eslint --init

#Add the snippet below into "script" in package.json file.
"lint": "eslint ."

#Run 
npm run lint

how to run eslint on the whole project

# cd to your root project folder
eslint "./**" --fix

npx eslint src

yarn lint-fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment