-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.cjs
81 lines (80 loc) · 2.18 KB
/
.eslintrc.cjs
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
// https://eslint.org/docs/user-guide/configuring
// https://eslint.vuejs.org/
module.exports = {
root: true,
env: {
node: true,
'vue/setup-compiler-macros': true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module',
extraFileExtensions: ['.vue'],
ecmaFeatures: {
jsx: true,
},
},
extends: [
'plugin:vue/base',
'plugin:vue/vue3-essential',
'plugin:vue/vue3-strongly-recommended',
'plugin:vue/vue3-recommended',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
rules: {
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'vue/block-tag-newline': [
'error',
{
singleline: 'always',
multiline: 'always',
},
],
'vue/custom-event-name-casing': ['error', 'kebab-case'],
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
'vue/html-comment-content-spacing': [process.env.NODE_ENV === 'production' ? 'error' : 'warn', 'always'],
'vue/no-reserved-component-names': [
'error',
{
disallowVueBuiltInComponents: true,
disallowVue3BuiltInComponents: true,
},
],
'vue/padding-line-between-blocks': [process.env.NODE_ENV === 'production' ? 'error' : 'warn', 'always'],
'vue/v-on-function-call': [
'error',
'never',
{
ignoreIncludesComment: false,
},
],
'vue/arrow-spacing': ['error'],
'sort-imports': [
'error',
{
allowSeparatedGroups: false,
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
},
overrides: [
{
files: ['*.d.ts'],
rules: {
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'no-unused-vars': 'off',
},
},
],
ignorePatterns: ['/node_modules/**', '/dist/**', '/public/**'],
}