forked from haobeiping/tiny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
34 lines (34 loc) · 954 Bytes
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
extends: 'standard',
plugins: [
'html'
],
rules: {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// http://eslint.org/docs/rules/comma-dangle
'comma-dangle': ['error', 'only-multiline'],
// 语句强制分号结尾
'semi': [2, "always"],
"no-new": 0
},
globals: {
'CONFIG': true
},
env: {
browser: true, // browser global variables.
node: true, // Node.js global variables and Node.js scoping.
worker: true, // web workers global variables.
mocha: true, // adds all of the Mocha testing global variables.
phantomjs: true, // PhantomJS global variables.
serviceworker: true // Service Worker global variables.
}
}