forked from jzfai/vue3-admin-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (55 loc) · 1.62 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
// https://blog.csdn.net/Sheng_zhenzhen/article/details/108685176
module.exports = {
root: true,
env: {
browser: true,
commonjs: true,
es6: true,
node: true
},
globals: {
defineEmits: true,
document: true,
localStorage: true,
GLOBAL_VAR: true,
window: true,
defineProps: true,
defineExpose: true
},
plugins: ['@typescript-eslint', 'prettier', 'import'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:vue/vue3-recommended', 'prettier'],
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
tsx: true
}
},
rules: {
'no-undef': [1],
'prefer-const': [1],
'import/no-unresolved': [0],
'vue/multi-word-component-names': 'off',
'vue/no-deprecated-router-link-tag-prop': 'off',
'import/extensions': 'off',
'import/no-absolute-path': 'off',
'no-async-promise-executor': 'off',
'import/no-extraneous-dependencies': 'off',
'vue/no-multiple-template-root': 'off',
'vue/html-self-closing': 'off',
'no-console': 'off',
'no-plusplus': 'off',
'no-useless-escape': 'off',
'no-bitwise': 'off',
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/explicit-module-boundary-types': ['off'],
'@typescript-eslint/ban-ts-comment': ['off'],
'vue/no-setup-props-destructure': ['off'],
'@typescript-eslint/no-empty-function': ['off'],
'vue/script-setup-uses-vars': ['off'],
//can config to 2 if need more then required
'@typescript-eslint/no-unused-vars': [0],
'no-param-reassign': ['off']
}
}