forked from js-tasks-ru/vue-20211004_maxim-b
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
58 lines (52 loc) · 1.74 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
module.exports = {
root: true,
ignorePatterns: ['**/vendor/*.js'],
env: {
browser: true,
node: true,
es2020: true,
},
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/prettier'],
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaFeatures: { jsx: true },
ecmaVersion: 2020,
},
rules: {
// Basic
'no-unused-vars': 'off', // For task start code
'no-console': 'warn',
'no-debugger': 'warn',
'no-var': 'error',
// Vue / Priority A: Essential Essential
'vue/no-unused-components': 'off', // For task start code
'vue/require-v-for-key': 'warn', // Unknown error in the beginning
'vue/valid-template-root': 'off', // For task start code
// Vue / Priority B: Strongly Recommended
'vue/v-bind-style': 'error',
'vue/v-on-style': 'error',
'vue/v-slot-style': 'error',
'vue/require-explicit-emits': 'warn',
'vue/mustache-interpolation-spacing': 'warn',
'vue/no-template-shadow': 'warn',
// Vue / Priority C: Recommended
'vue/attributes-order': process.env.TASK_DEV ? 'error' : 'warn',
'vue/order-in-components': process.env.TASK_DEV ? 'error' : 'warn',
'vue/new-line-between-multi-line-property': process.env.TASK_DEV ? 'error' : 'off',
'vue/this-in-template': 'error',
// Vue / Uncategorized
'vue/match-component-file-name': process.env.TASK_DEV ? 'error' : 'off',
'vue/no-duplicate-attr-inheritance': 'error',
'vue/no-useless-v-bind': process.env.TASK_DEV ? 'error' : 'warn',
'vue/padding-line-between-blocks': process.env.TASK_DEV ? 'error' : 'warn',
'vue/v-for-delimiter-style': 'error',
},
overrides: [
{
files: ['**/__tests__/*.js?(x)'],
env: {
jest: true,
},
},
],
};