Skip to content

Instantly share code, notes, and snippets.

@iliakan
Created December 22, 2019 11:29
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 iliakan/512238830a2e87071c775018d83c1db9 to your computer and use it in GitHub Desktop.
Save iliakan/512238830a2e87071c775018d83c1db9 to your computer and use it in GitHub Desktop.
module.exports = {
env: {
browser: true,
es6: true,
mocha: true
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
'no-debugger': 'warn',
'no-dupe-keys': 'warn',
'no-dupe-args': 'warn',
'no-duplicate-case': 'warn',
'no-empty': 'warn',
'no-extra-semi': 'warn',
'no-func-assign': 'warn',
'no-obj-calls': 'warn',
'no-sparse-arrays': 'warn',
'no-unreachable': 'warn',
'valid-typeof': 'warn',
'no-multi-spaces': 'warn',
'no-with': 'warn',
'curly': 'warn',
'no-unused-expressions': 'warn',
'no-shadow-restricted-names': 'warn',
'no-undefined': 'off',
'camelcase': 'warn',
'indent': ['warn', 2, {
// continuation indent
MemberExpression: 'off',
}],
'array-bracket-spacing': ['warn', 'never'],
'comma-spacing': 'warn',
'comma-style': 'warn',
'computed-property-spacing': 'warn',
'func-call-spacing': 'warn',
'key-spacing': 'warn',
'keyword-spacing': 'warn',
'new-cap': 'warn',
'no-mixed-spaces-and-tabs': 'warn',
'one-var': ['warn', {
var: 'never',
let: 'never',
const: 'never'
}],
'semi': 'warn',
'space-in-parens': ['warn', 'never'],
'space-before-blocks': 'warn',
'unicode-bom': 'warn',
'new-parens': 'warn',
'no-nested-ternary': 'warn',
'space-infix-ops': 'warn',
'space-unary-ops': ['warn', {words: true, nonwords: false}],
// ES2015
'constructor-super': 'warn',
'no-this-before-super': 'warn',
'no-var': 'warn',
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment