UNPKG

1.35 kBJavaScriptView Raw
1module.exports = {
2 root: true,
3
4 parserOptions: {
5 parser: 'babel-eslint',
6 sourceType: 'module'
7 },
8
9 env: {
10 browser: true
11 },
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
30 },
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'
54 }
55}