Skip to content

Instantly share code, notes, and snippets.

@scottgreenup
Created October 10, 2017 00:15
Show Gist options
  • Save scottgreenup/7223a0bdf24f92d7a06cabe9cd42f9c7 to your computer and use it in GitHub Desktop.
Save scottgreenup/7223a0bdf24f92d7a06cabe9cd42f9c7 to your computer and use it in GitHub Desktop.
.eslintrc.js example
module.exports = {
'extends': 'google',
'parserOptions': {
'ecmaVersion': 6,
},
'rules': {
// https://eslint.org/docs/rules/array-bracket-spacing
'array-bracket-spacing': ['error', 'never'],
// Use the one true brace style
'brace-style': ['error', '1tbs'],
// Enforce using camelCase
'camelcase': ['error', {'properties': 'always'}],
// Shouldn't use console.* -- use a proper logger instead, e.g.
// https://www.npmjs.com/package/winston
'no-console': ['warn'],
'no-debugger': ['warn'],
// Indent at 4 spaces
'indent': ['error', 4],
// No trailing spaces in code
'no-trailing-spaces': ['error'],
// Don't use semicolons at the end of your statements
'semi': ['error', 'never'],
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment