Skip to content

Instantly share code, notes, and snippets.

@klauszhang
Created August 23, 2017 09:37
Show Gist options
  • Save klauszhang/25f35d4feda5b5bca01ca0f81dc88e78 to your computer and use it in GitHub Desktop.
Save klauszhang/25f35d4feda5b5bca01ca0f81dc88e78 to your computer and use it in GitHub Desktop.
for common linting
module.exports = {
parser: 'babel-eslint',
env: {
commonjs: true,
es6: true,
node: true,
jest: true
},
extends: ['eslint:recommended'],
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
sourceType: 'module'
},
rules: {
indent: ['error', 2, { SwitchCase: 1 }],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'no-console': ['warn', { allow: ['info', 'error'] }],
'arrow-parens': ['error', 'always']
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment