Repository navigation
Expand file tree
/
Copy patheslint.config.mjs
More file actions
124 lines (123 loc) · 3.25 KB
/
Copy patheslint.config.mjs
File metadata and controls
124 lines (123 loc) · 3.25 KB
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
117
118
119
120
121
122
123
124
import antfu from '@antfu/eslint-config'
export default antfu(
{
vue: true,
typescript: true,
ignores: [
'**/dist/**',
'**/.nuxt/**',
'**/.output/**',
'**/.data/**',
'**/coverage/**',
'.evidence/**',
// Symlink to packages/vue/README.md; lint the file once, at its source.
'README.md',
],
},
{
ignores: ['*.js'],
},
{
rules: {
'ts/no-non-null-asserted-optional-chain': 'off',
'ts/ban-ts-comment': 'warn',
'ts/consistent-type-definitions': 'off',
'ts/no-unsafe-function-type': 'off',
'ts/no-unused-expressions': 'off',
'ts/no-empty-object-type': 'off',
'symbol-description': 'off',
'no-console': 'warn',
'import/first': 'off',
'import/order': 'off',
'style/max-statements-per-line': ['error', { max: 2 }],
'vue/one-component-per-file': 'off',
'unicorn/prefer-dom-node-text-content': 'off',
'unicorn/prefer-number-properties': 'off',
'unused-imports/no-unused-vars': 'off',
'regexp/no-super-linear-backtracking': 'off',
'vue/no-parsing-error': [2, { 'x-invalid-namespace': false }],
'no-async-promise-executor': 'off',
'node/prefer-global/process': 'off',
},
},
{
files: ['**/*.vue'],
rules: {
'vue/max-attributes-per-line': ['error', {
singleline: 1,
multiline: 1,
}],
},
},
{
files: ['packages/vue/src/core/**/*.ts'],
ignores: ['**/__tests__/**'],
rules: {
'no-restricted-imports': ['error', {
paths: [{ name: '@/utils', message: 'Import a pure utility directly, not the browser utility barrel.' }],
patterns: [{
group: [
'vue',
'vue/*',
'@vue/*',
'motion-v',
'motion-v/*',
'motion-dom',
'@/utils/DOMUtils',
'@/utils/attrs',
'@/utils/Global',
'@/utils/VueUtils',
'@/utils/chart',
'**/utils/DOMUtils',
'**/utils/attrs',
'**/utils/Global',
'**/utils/VueUtils',
'**/utils/chart',
'@/model/**',
'@/state/**',
'@/components/**',
'@/chart/**',
'@/cartesian/**',
'@/polar/**',
'@/container/**',
'@/shape/**',
'**/model/**',
'**/state/**',
'**/components/**',
'**/chart/**',
'**/cartesian/**',
'**/polar/**',
'**/container/**',
'**/shape/**',
],
message: 'Core math must depend only on pure functions and domain types.',
}],
}],
'no-restricted-globals': [
'error',
'window',
'document',
'navigator',
'localStorage',
'sessionStorage',
'IntersectionObserver',
'ResizeObserver',
'MutationObserver',
'requestAnimationFrame',
'cancelAnimationFrame',
'getComputedStyle',
'matchMedia',
'customElements',
'fetch',
],
},
},
{
files: ['packages/vue/src/**/*.{ts,tsx,vue}'],
ignores: [
'**/__tests__/**',
'**/test/**',
],
rules: { 'ts/no-explicit-any': 'error' },
},
)