-
Notifications
You must be signed in to change notification settings - Fork 45
/
.eslintrc.js
62 lines (56 loc) · 1.57 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
module.exports = {
root: true,
ignorePatterns: ['**/vendor/*.js'],
env: {
browser: true,
node: true,
es2021: true,
'vue/setup-compiler-macros': true,
},
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', 'prettier'],
parserOptions: {
parser: 'espree',
ecmaVersion: 2021,
ecmaFeatures: {
jsx: true,
},
},
rules: {
// Basic
'no-unused-vars': 'off',
'no-console': 'off',
'no-debugger': 'off',
'no-var': 'error',
// Vue / Priority A: Essential Essential
'vue/no-unused-components': 'off',
'vue/valid-template-root': 'off',
// Vue / Priority B: Strongly Recommended
'vue/v-bind-style': 'error',
'vue/v-on-style': 'error',
'vue/v-slot-style': 'error',
'vue/require-explicit-emits': 'error',
'vue/mustache-interpolation-spacing': 'warn',
'vue/no-template-shadow': 'warn',
// Vue / Priority C: Recommended
'vue/attributes-order': 'warn',
'vue/order-in-components': 'warn',
'vue/new-line-between-multi-line-property': 'warn',
'vue/this-in-template': 'error',
// Vue / Uncategorized
'vue/match-component-file-name': 'error',
'vue/no-duplicate-attr-inheritance': 'error',
'vue/no-restricted-call-after-await': 'error',
'vue/no-useless-v-bind': 'error',
'vue/padding-line-between-blocks': 'error',
'vue/v-for-delimiter-style': 'error',
'vue/valid-next-tick': 'error',
},
overrides: [
{
files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
env: {
jest: true,
},
},
],
};