forked from Cap-go/capgo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
53 lines (50 loc) · 1.44 KB
/
eslint.config.js
File metadata and controls
53 lines (50 loc) · 1.44 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
import { env } from 'node:process'
if (typeof Object.groupBy !== 'function') {
Object.groupBy = function groupBy(items, callbackfn) {
return Array.from(items).reduce((groups, item, index) => {
const key = callbackfn(item, index)
if (!Object.hasOwn(groups, key)) {
groups[key] = []
}
groups[key].push(item)
return groups
}, Object.create(null))
}
}
const { default: antfu } = await import('@antfu/eslint-config')
export default antfu(
{
vue: true,
formatters: true,
rules: {
// These micro-optimisation rules create broad churn across the legacy UI codebase.
// Keep lint focused on signal over noise for now.
'e18e/prefer-array-some': 'off',
'e18e/prefer-date-now': 'off',
'e18e/prefer-nullish-coalescing': 'off',
'e18e/prefer-object-has-own': 'off',
'e18e/prefer-static-regex': 'off',
'e18e/prefer-timer-args': 'off',
'no-console': env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': env.NODE_ENV === 'production' ? 'warn' : 'off',
},
ignores: [
'dist',
'scripts',
'public',
'supabase/functions/_script',
'**/supabase.types*',
'supabase/functions/_backend/scripts/*',
'CHANGELOG.md',
'src/services/posthog.ts',
],
},
{
// Vue-specific overrides
files: ['**/*.vue'],
rules: {
// Globally disallow v-html
'vue/no-v-html': 'error',
},
},
)