Skip to content

Instantly share code, notes, and snippets.

@cladley
Last active November 11, 2018 18:10
Show Gist options
  • Save cladley/b13c82649c781dbe421a5441cfb74374 to your computer and use it in GitHub Desktop.
Save cladley/b13c82649c781dbe421a5441cfb74374 to your computer and use it in GitHub Desktop.
eslint example
to install eslint run
npm install eslint
create eslint.rc file with contents
{
"parserOptions": {
"ecmaVersion": "2018"
},
"extends": ["eslint:recommended"],
"rules": {
"valid-typeof": "error", // can be warn, error or off
"no-console": "off"
},
"env": {
"browser": true
}
}
run command eslint to show errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment