-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
56 lines (55 loc) · 1.35 KB
/
eslint.config.js
File metadata and controls
56 lines (55 loc) · 1.35 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
import antfu from '@antfu/eslint-config'
export default antfu({
vue: true,
typescript: {
tsconfigPath: 'tsconfig.json',
},
// Force editor detection off so formatting/autofix rules aren't suppressed
// when ZED_ENVIRONMENT is set in the LSP process
isInEditor: false,
// Global rules
rules: {
'unicorn/prefer-node-protocol': 'off',
'node/prefer-global/process': 'off',
'ts/no-explicit-any': 'error',
'n/prefer-global/process': 'off',
},
ignores: [
'package.json',
'package-lock.json',
'**/supabase/functions/**/*.ts',
'**/hash.js',
'REFACTOR.md',
'.you/**',
],
// Add additional configurations for specific file patterns
formatters: {
vue: true,
css: true,
scss: true,
markdown: true,
html: true,
},
}, {
// Scope vue rules to Vue files only - applying them globally (e.g. to .md)
// causes crashes because getTemplateBodyTokenStore() only exists in Vue contexts.
files: ['**/*.vue'],
rules: {
'vue/object-property-newline': ['error', {
allowAllPropertiesOnSameLine: false,
}],
},
}, {
files: ['**/*.ts', '**/*.tsx'],
rules: {
'ts/prefer-nullish-coalescing': 'error',
},
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
})