1 | module.exports = {
|
2 | root: true,
|
3 | parser: 'babel-eslint',
|
4 | parserOptions: {
|
5 | sourceType: 'module'
|
6 | },
|
7 | env: {
|
8 | browser: true
|
9 | },
|
10 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
|
11 | extends: 'standard',
|
12 | // required to lint *.wpy files
|
13 | plugins: [
|
14 | 'html'
|
15 | ],
|
16 | settings: {
|
17 | 'html/html-extensions': ['.html', '.wpy']
|
18 | },
|
19 | // add your custom rules here
|
20 | 'rules': {
|
21 | // allow paren-less arrow functions
|
22 | 'arrow-parens': 0,
|
23 | // allow async-await
|
24 | 'generator-star-spacing': 0,
|
25 | // allow debugger during development
|
26 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
27 | 'space-before-function-paren': 0,
|
28 | "indent": [2, 4],//缩进风格
|
29 | }
|
30 | }
|