-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
84 lines (83 loc) · 2.01 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
82
83
84
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:jsonc/recommended-with-json',
'plugin:vue/vue3-recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier',
],
overrides: [
// {
// files: '*.vue',
// rules: {
// 'import/default': 'off',
// 'import/namespace': 'off',
// 'import/no-named-as-default': 'off',
// 'import/no-named-as-default-member': 'off',
// },
// },
{
files: ['src/**', 'index.js'],
rules: {
'sort-keys-fix/sort-keys-fix': ['warn', 'asc', { natural: true }],
},
},
],
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
plugins: [
'jsonc',
'import',
'simple-import-sort',
// 'sort-destructure-keys',
'sort-keys-fix',
],
root: true,
rules: {
'import/order': [
'warn',
{
'groups': ['builtin', 'external', 'parent', 'sibling', 'type'],
'newlines-between': 'always',
'pathGroups': [
{ group: 'parent', pattern: '@/**', position: 'before' },
],
'pathGroupsExcludedImportTypes': ['type'],
},
],
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'off',
// 'sort-destructure-keys/sort-destructure-keys': 'warn',
'vue/v-on-event-hyphenation': [
'warn',
'always',
{
autofix: true,
},
],
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/external-module-folders': ['.yarn', 'node_modules'],
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: [
__dirname + '/tsconfig.json',
__dirname + '/tsconfig.config.json',
],
},
node: true,
},
},
};