Skip to content

Instantly share code, notes, and snippets.

@samueljseay
Created December 12, 2016 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueljseay/51c4c1627497928671fe894e7a3f7cb2 to your computer and use it in GitHub Desktop.
Save samueljseay/51c4c1627497928671fe894e7a3f7cb2 to your computer and use it in GitHub Desktop.
lint console logs with eslint before committing code
# put paths to files you don't want to lint here
path/to/files/to/ignore
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
},
"rules": {
"no-console": "error"
}
}
# make sure you have eslint installed via npm install -g eslint
eslint path/to/javascripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment