-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
110 lines (109 loc) · 3.28 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* eslint-disable no-magic-numbers */
module.exports = {
extends: ['standard', 'plugin:vue/recommended', 'prettier', 'prettier/vue'],
plugins: ['compat', 'prettier', 'html'],
globals: {
process: true,
},
env: {
browser: true,
},
settings: {
polyfills: ['promises'],
},
rules: {
curly: ['error', 'all'],
'array-callback-return': 'error',
camelcase: ['error', { properties: 'always' }],
'compat/compat': 'error',
complexity: ['error', 10],
'consistent-return': 'error',
'consistent-this': ['error', 'self'],
'default-case': 'error',
eqeqeq: ['error', 'smart'],
'func-names': 'error',
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'id-blacklist': ['error', 'cb'],
'id-length': ['error', { exceptions: ['e', '_', '$', 'i'] }],
'max-depth': ['error', 4],
'max-nested-callbacks': ['error', 3],
'max-statements': ['error', 30],
'no-alert': 'error',
'no-bitwise': 'error',
'no-case-declarations': 'error',
'no-class-assign': 'error',
'no-duplicate-imports': ['error', { includeExports: true }],
'no-div-regex': 'error',
'no-else-return': 'error',
'no-empty': 'error',
'no-empty-function': 'error',
'no-eq-null': 'off',
'no-extra-label': 'error',
'no-implicit-coercion': 'error',
'no-implicit-globals': 'error',
'no-invalid-this': 'error',
'no-loop-func': 'error',
'no-lonely-if': 'error',
'no-magic-numbers': ['error', { ignore: [-1, 0, 1, 2, 4, 100] }],
'no-script-url': 'error',
'no-shadow': 'error',
'no-underscore-dangle': 'error',
'no-useless-concat': 'error',
'no-warning-comments': [
'warn',
{
terms: ['todo', 'fixme'],
location: 'start',
},
],
'no-var': 'error',
'object-shorthand': ['error', 'always'],
'operator-assignment': ['error', 'always'],
'prefer-const': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
'require-yield': 'error',
'spaced-comment': 'off',
'standard/computed-property-even-spacing': 'off',
'standard/object-curly-even-spacing': 'off',
'vue/array-bracket-spacing': 'error',
'vue/arrow-spacing': 'error',
'vue/attribute-hyphenation': ['error', 'never'],
'vue/block-spacing': 'error',
'vue/brace-style': 'error',
'vue/camelcase': 'error',
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{
ignores: [
'translate',
'router-view',
'router-link',
'component',
'transition',
'transition-group',
'template',
],
},
],
'vue/eqeqeq': 'error',
'vue/html-self-closing': 'off',
'vue/match-component-file-name': 'error',
'vue/name-property-casing': ['error', 'PascalCase'],
'vue/no-boolean-default': 'error',
'vue/no-restricted-syntax': 'error',
'vue/no-template-shadow': 'error',
'vue/prop-name-casing': ['error', 'camelCase'],
'vue/require-default-prop': 'off',
'vue/require-direct-export': 'error',
'vue/space-infix-ops': 'error',
'vue/space-unary-ops': 'error',
'vue/v-on-function-call': 'error',
},
parserOptions: {
parser: 'babel-eslint',
allowImportExportEverywhere: true,
},
}