forked from vueuse/vueuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
78 lines (76 loc) · 1.88 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
const { resolve } = require('path')
const restricted = [
'vue',
'@vue/composition-api',
'..',
'../..',
resolve(__dirname, 'packages/core/index.ts'),
resolve(__dirname, 'packages/shared/index.ts'),
{
name: 'vue-demi',
importNames: ['onMounted', 'onUnmounted'],
message: 'Use tryOnMounted and tryOnScopeDispose instead.',
},
]
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: '@antfu/eslint-config',
rules: {
'react/no-string-refs': 'off',
'react/no-unknown-property': 'off',
'react/display-name': 'off',
'vue/no-deprecated-functional-template': 'off',
'vue/one-component-per-file': 'off',
'vue/no-template-shadow': 'off',
'vue/require-prop-types': 'off',
'spaced-comment': ['error', 'always', { exceptions: ['#__PURE__'] }],
'no-restricted-imports': [
'error',
{
paths: restricted,
},
],
'node/no-callback-literal': 'off',
'import/namespace': 'off',
'import/default': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
},
overrides: [
{
files: ['packages/shared/**/*.ts'],
rules: {
'no-restricted-imports': ['error',
{
paths: [
...restricted,
'@vueuse/shared',
],
},
],
},
},
{
files: ['**/*.md', '**/*.md/*.*', 'demo.vue', 'scripts/*.ts', '*.test.ts'],
rules: {
'no-alert': 'off',
'no-console': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'no-restricted-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-redeclare': 'off',
},
},
{
files: ['packages/.vitepress/**/*.*', 'playgrounds/**/*.*'],
rules: {
'no-restricted-imports': 'off',
},
},
],
}