2017-01-23 01:12:24 +08:00
|
|
|
|
module.exports = {
|
|
|
|
|
root: true,
|
|
|
|
|
parserOptions: {
|
2019-04-07 23:03:32 +08:00
|
|
|
|
parser: 'babel-eslint',
|
|
|
|
|
ecmaVersion: 2017, //指定ECMAScript支持的版本,6为ES6,这里为了兼容async和await,设置为2017
|
2017-01-23 01:12:24 +08:00
|
|
|
|
sourceType: 'module'
|
|
|
|
|
},
|
|
|
|
|
extends: 'standard',
|
|
|
|
|
plugins: [
|
|
|
|
|
'html',
|
2017-01-23 03:38:59 +08:00
|
|
|
|
'promise'
|
2017-01-23 01:12:24 +08:00
|
|
|
|
],
|
|
|
|
|
env: {
|
2019-04-07 23:03:32 +08:00
|
|
|
|
'node': true
|
2017-01-23 01:12:24 +08:00
|
|
|
|
},
|
2017-02-07 16:05:12 +08:00
|
|
|
|
rules: {
|
2017-01-23 01:12:24 +08:00
|
|
|
|
// allow console
|
2017-01-23 03:38:59 +08:00
|
|
|
|
'no-console': 0,
|
2017-01-23 01:12:24 +08:00
|
|
|
|
// allow paren-less arrow functions
|
|
|
|
|
'arrow-parens': 0,
|
|
|
|
|
// allow async-await
|
|
|
|
|
'generator-star-spacing': 0,
|
|
|
|
|
// allow debugger during development
|
|
|
|
|
'no-debugger': 0
|
|
|
|
|
}
|
|
|
|
|
}
|