This repository has been archived by the owner on Jan 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
106 lines (101 loc) · 2.97 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
/*eslint-env node*/
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
'plugin:vue-scoped-css/vue3-recommended',
'plugin:import/recommended',
],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
rules: {
'object-curly-spacing': ['error', 'always'],
'space-before-blocks': 'error',
'arrow-spacing': ['error', { 'before': true, 'after': true }],
'arrow-body-style': ['error', 'as-needed'],
'quotes': ['error', 'single'],
'key-spacing': ['error'],
'space-infix-ops': 'error',
'semi': ['warn', 'never'],
'linebreak-style': ['off'],
'space-before-function-paren': ['error', 'never'],
'no-plusplus': ['error', {
allowForLoopAfterthoughts: true,
}],
'no-multi-spaces': ['error', {
ignoreEOLComments: false,
}],
'no-plusplus': ['error', {
allowForLoopAfterthoughts: true,
}],
'no-multi-spaces': ['error', {
ignoreEOLComments: false,
}],
'object-curly-newline': ['error', {
ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
ObjectPattern: { minProperties: 4, multiline: true, consistent: true },
ImportDeclaration: { minProperties: 4, multiline: true, consistent: true },
ExportDeclaration: { minProperties: 4, multiline: true, consistent: true },
}],
'comma-spacing': ['error', { before: false, after: true }],
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
}],
'no-trailing-spaces': ['error', {
skipBlankLines: false,
ignoreComments: false,
}],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }],
'no-unused-vars': 'off',
'no-undef': 'warn',
indent: 'off',
'import/named': 'off',
'import/no-unresolved': 'off',
'import/prefer-default-export': ['off'],
'import/newline-after-import': ['error', { 'count': 1 }],
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
overrides: [
{
files: ['*.vue'],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
},
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'vue/html-self-closing': 'warn',
'vue/padding-line-between-blocks': 'error',
'vue/max-attributes-per-line': ['warn', {
singleline: 2,
}],
'vue/component-name-in-template-casing': [
'warn',
'PascalCase',
{
registeredComponentsOnly: false,
},
],
},
},
],
settings: {
'import/resolver': {
node: {
extensions: [
'.vue',
'.js',
'.ts',
],
},
},
},
}