This repository has been archived by the owner on Oct 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
79 lines (79 loc) · 3.19 KB
/
.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
module.exports = {
root: true,
env: {
browser: true,
},
extends: [
'airbnb-base',
'plugin:vue/recommended',
],
parserOptions: {
parser: 'babel-eslint',
},
plugins: [
'vue',
],
rules: {
'arrow-body-style': 'off',
'arrow-parens': 0,
'class-methods-use-this': 'off',
'consistent-return': 'warn',
'default-case': 'off',
'eqeqeq': 'off',
'generator-star-spacing': 0,
'global-require': 'off',
'import/extensions': ['error', 'ignorePackages'],
'import/no-cycle': 'off',
'import/no-dynamic-require': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
'import/no-unresolved': 'off',
'import/prefer-default-export': 'warn',
'indent': ['error', 4, { SwitchCase: 1 }],
'max-len': 'off',
'no-continue': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-mixed-operators': 'off',
'no-new': 'off',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-prototype-builtins': 'off',
'no-restricted-globals': 'off',
'no-restricted-syntax': 'off',
'no-shadow': 'off',
'no-undef': 'off',
'no-underscore-dangle': 'off',
'no-unused-expressions': ['off', { allowTernary: true, allowShortCircuit: true }],
'no-unused-vars': 'warn',
'object-shorthand': ['error', 'always'],
'operator-linebreak': ['warn', 'after', { overrides: { '?': 'before', ':': 'before' } }],
'prefer-const': ['warn', { destructuring: 'all' }],
'prefer-destructuring': 'off',
'quote-props': ['warn', 'consistent-as-needed'],
'semi': ['error', 'always', { omitLastInOneLineBlock: true }],
'vue/attributes-order': ['warn', { order: ['GLOBAL', 'DEFINITION', 'OTHER_ATTR', 'UNIQUE', 'EVENTS', 'RENDER_MODIFIERS', 'OTHER_DIRECTIVES', 'CONTENT', 'TWO_WAY_BINDING', 'LIST_RENDERING', 'CONDITIONALS'], alphabetical: true }],
'vue/component-name-in-template-casing': ['error', 'kebab-case', { registeredComponentsOnly: false }],
'vue/html-indent': ['error', 4],
'vue/max-attributes-per-line': ['error', { singleline: 3 }],
'vue/no-v-html': 'off',
'vue/order-in-components': ['error', { order: ['el', 'name', 'parent', 'functional', ['delimiters', 'comments'], ['components', 'directives', 'filters'], 'extends', 'mixins', 'inheritAttrs', 'model', ['props', 'propsData'], 'data', 'computed', 'watch', 'methods', 'LIFECYCLE_HOOKS', ['template', 'render'], 'renderError'] }],
'vue/padding-line-between-blocks': ['error', 'always'],
'vue/require-default-prop': 'off',
'vue/script-indent': ['error', 4, { baseIndent: 1, switchCase: 1 }],
},
overrides: [
{
files: ['*.vue'],
rules: {
indent: 'off',
},
},
{
files: ['!*.vue'],
rules: {
'vue/script-indent': 'off',
},
},
],
};