Last active
February 11, 2018 08:26
-
-
Save pissang/41a3c620aef3465307470f52b1e2a068 to your computer and use it in GitHub Desktop.
My eslintrc.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
root: true, | |
parser: 'babel-eslint', | |
parserOptions: { | |
sourceType: 'module' | |
}, | |
env: { | |
browser: true, | |
node: true | |
}, | |
globals: { | |
Promise: true, | |
$: true, | |
jQuery: true, | |
echarts: true, | |
clay: true, | |
Float32Array: true, | |
Uint32Array: true, | |
Float64Array: true, | |
Uint8Array: true, | |
Uint16Array: true | |
}, | |
rules: { | |
'eqeqeq': [2, 'allow-null'], | |
'quotes': [2, 'single', { | |
allowTemplateLiterals: true | |
}], | |
'no-dupe-keys': 2, | |
'no-func-assign': 2, | |
'no-invalid-regexp': 2, | |
'no-unreachable': 2, | |
'valid-typeof': 2, | |
'no-loop-func': 1, | |
'no-lone-blocks': 1, | |
'no-undef': 2, | |
'no-unused-vars': 1, | |
'no-use-before-define': [2, { | |
functions: false | |
}], | |
'no-unneeded-ternary': 2, | |
'no-self-compare': 2, | |
'brace-style': [2, 'stroustrup', { | |
allowSingleLine: true | |
}], | |
'comma-style': [2, 'last'], | |
'comma-spacing': [2, { | |
'before': false, | |
'after': true | |
}], | |
'no-spaced-func': 2, | |
'no-trailing-spaces': 2, | |
'one-var': [2, 'never'], | |
'no-duplicate-imports': 2, | |
'block-scoped-var': 2, | |
"indent": [1, 4, { | |
SwitchCase: 1 | |
}], | |
"key-spacing": [2, { | |
afterColon: true, | |
beforeColon: false, | |
mode: "strict" | |
}], | |
"comma-spacing": [2, { | |
before: false, | |
after: true | |
}], | |
"semi": [2, 'always'] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment