|
1 | 1 | module.exports = {
|
2 | 2 | root: true,
|
| 3 | + |
| 4 | + parserOptions: { |
| 5 | + parser: 'babel-eslint', |
| 6 | + sourceType: 'module' |
| 7 | + }, |
| 8 | + |
3 | 9 | env: {
|
4 |
| - node: true |
| 10 | + browser: true |
5 | 11 | },
|
6 |
| - extends: ["plugin:vue/essential", "@vue/prettier"], |
7 |
| - rules: { |
8 |
| - "no-console": process.env.NODE_ENV === "production" ? "error" : "off", |
9 |
| - "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off" |
| 12 | + |
| 13 | + extends: [ |
| 14 | + // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention |
| 15 | + // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. |
| 16 | + 'plugin:vue/essential', |
| 17 | + '@vue/standard' |
| 18 | + ], |
| 19 | + |
| 20 | + // required to lint *.vue files |
| 21 | + plugins: [ |
| 22 | + 'vue' |
| 23 | + ], |
| 24 | + |
| 25 | + globals: { |
| 26 | + 'ga': true, // Google Analytics |
| 27 | + 'cordova': true, |
| 28 | + '__statics': true, |
| 29 | + 'process': true |
10 | 30 | },
|
11 |
| - parserOptions: { |
12 |
| - parser: "babel-eslint" |
| 31 | + |
| 32 | + // add your custom rules here |
| 33 | + rules: { |
| 34 | + // allow async-await |
| 35 | + 'generator-star-spacing': 'off', |
| 36 | + // allow paren-less arrow functions |
| 37 | + 'arrow-parens': 'off', |
| 38 | + 'one-var': 'off', |
| 39 | + |
| 40 | + 'import/first': 'off', |
| 41 | + 'import/named': 'error', |
| 42 | + 'import/namespace': 'error', |
| 43 | + 'import/default': 'error', |
| 44 | + 'import/export': 'error', |
| 45 | + 'import/extensions': 'off', |
| 46 | + 'import/no-unresolved': 'off', |
| 47 | + 'import/no-extraneous-dependencies': 'off', |
| 48 | + 'prefer-promise-reject-errors': 'off', |
| 49 | + |
| 50 | + // allow console.log during development only |
| 51 | + //'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
| 52 | + // allow debugger during development only |
| 53 | + //'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' |
13 | 54 | }
|
14 |
| -}; |
| 55 | +} |
0 commit comments