-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
executable file
·116 lines (111 loc) · 2.89 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
111
112
113
114
115
116
module.exports = {
env: {
es2020: true,
browser: true,
},
extends: [
'airbnb-base',
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/typescript/recommended',
'@vue/prettier',
'@vue/eslint-config-typescript',
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
},
plugins: ['@typescript-eslint', 'import', 'jsx-a11y'],
ignorePatterns: ['dist/**', '.eslintrc.js', 'config-overrides.js'],
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
rules: {
// override rule from 'plugin:@typescript-eslint/recommended'
'react/jsx-filename-extension': 0,
'import/order': [
2,
{
groups: ['builtin', 'external', 'internal'],
pathGroups: [
{
pattern: 'vue',
group: 'external',
position: 'before',
},
{
pattern: '@+(api|components|compositions|directives|enums|interfaces|layouts|modules|services|utils|views)/**',
group: 'internal',
},
{
pattern: '@/**',
group: 'internal',
},
{
pattern: '*.scss',
group: 'index',
patternOptions: { matchBase: true },
},
],
pathGroupsExcludedImportTypes: ['vue'],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'@typescript-eslint/explicit-function-return-type': [
1,
{
allowExpressions: true,
},
],
'@typescript-eslint/lines-between-class-members': 0,
'@typescript-eslint/no-use-before-define': 0,
'class-methods-use-this': 0,
'import/prefer-default-export': 0,
'import/extensions': 0,
'import/no-unresolved': 0,
'no-console': [1, { allow: ['warn', 'error'] }],
'no-continue': 0,
'no-multiple-empty-lines': 2,
'no-return-assign': [2, 'except-parens'],
'no-useless-return': 1,
'prettier/prettier': 1,
quotes: ['error', 'single', { allowTemplateLiterals: true }],
semi: [2, 'always'],
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/label-has-associated-control': [
2,
{
some: ['nesting', 'id'],
labelComponents: [],
labelAttributes: [],
controlComponents: [],
depth: 25,
},
],
'jsx-a11y/no-static-element-interactions': 0,
'vue/component-tags-order': [
'error',
{
order: ['template', 'script', 'style'],
},
],
'vue/attributes-order': 1,
},
};