forked from TDesignOteam/eslint-config-tdesign
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue-next.js
60 lines (59 loc) · 1.36 KB
/
vue-next.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
const vueRule = require('./rules/vue');
module.exports = {
extends: ['plugin:vue/vue3-recommended', 'plugin:prettier/recommended'],
plugins: ['vue'],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.vue'],
},
globals: {
cy: 'readonly',
clipboardData: 'readonly',
PKG_VERSION: true,
},
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
},
rules: {
...vueRule,
},
overrides: [
{
files: ['*.vue'],
rules: {
'vue/component-name-in-template-casing': [2, 'kebab-case'],
'vue/require-default-prop': 0,
'vue/multi-word-component-names': 0,
'vue/no-reserved-props': 0,
},
},
{
files: ['**/demos/*', 'script/**/*', 'script/*', '*.js', 'site/**/*', 'site/*'],
rules: {
'no-var-requires': 0,
'no-console': 0,
'no-unused-expressions': 0,
'no-alert': 0,
},
},
{
// enable the rule specifically for TypeScript files
files: ['*.ts', '*.tsx'],
rules: {
'prefer-spread': 0,
'@typescript-eslint/explicit-function-return-type': 0,
},
},
{
files: ['*.test.js'],
rules: {
'import/no-dynamic-require': 'off',
'global-require': 'off',
},
},
{
files: '*',
},
],
};