Skip to content

Instantly share code, notes, and snippets.

@tyom
Created September 7, 2016 14:20
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 tyom/714f15801ba29c3e7a444eb8aedef2be to your computer and use it in GitHub Desktop.
Save tyom/714f15801ba29c3e7a444eb8aedef2be to your computer and use it in GitHub Desktop.
ESLint config template
{
"extends": "eslint:recommended",
"root": true,
"env": {
"es6": true,
"browser": true,
"node": true
},
"parserOptions": {
"sourceType": "module"
},
"rules": {
// Best practice
"no-use-before-define": [
2,
"nofunc"
],
"eqeqeq": 2,
"no-eq-null": 2,
"no-extend-native": 2,
"no-caller": 2,
"no-multi-spaces": 2,
// Style
"indent": [
2,
2,
{
"SwitchCase": 1
}
],
"comma-spacing": [
2,
{"after": true}
],
"eol-last": 2,
"object-curly-spacing": 2,
"keyword-spacing": 2,
"space-before-blocks": 2,
"curly": 2,
"semi": 2,
"quotes": [
2,
"single"
],
"space-in-parens": 2,
"array-bracket-spacing": 2,
// ES6 Style
"no-var": 2,
"object-shorthand": 2,
"prefer-arrow-callback": 2,
"arrow-spacing": 2
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment