-
-
Notifications
You must be signed in to change notification settings - Fork 134
Expand file tree
/
Copy patheslint.config.js
More file actions
60 lines (59 loc) · 1.56 KB
/
eslint.config.js
File metadata and controls
60 lines (59 loc) · 1.56 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
import antfu from '@antfu/eslint-config'
export default antfu(
{
ignores: [
'cache',
'dist',
'public',
'packages/valaxy/index.d.ts',
// generated
'api/typedoc',
],
rules: {
'no-dupe-keys': 'off',
'e18e/prefer-static-regex': 'off',
},
},
{
files: ['**/*.md'],
rules: {
'style/no-trailing-spaces': 'off',
},
},
{
files: [
'demo/**/pages/**/*.md',
'docs/pages/**/*.md',
'packages/create-valaxy/template-blog/pages/**/*.md',
'packages/valaxy-theme-yun/docs/**/*.md',
'api/**/*.md',
],
rules: {
// Valaxy markdown files use YAML frontmatter with `#` comments
// that ESLint incorrectly interprets as H1 headings
'markdown/no-multiple-h1': 'off',
// Valaxy uses `{lang="..."}` heading attributes that affect anchor IDs
// in ways the ESLint rule doesn't understand
'markdown/no-missing-link-fragments': 'off',
// Demo/test files may contain intentional empty images for testing
'markdown/no-empty-images': 'off',
// Content files may intentionally omit alt text for testing purposes
'markdown/require-alt-text': 'off',
},
},
{
files: ['**/*.ts'],
rules: {
'regexp/no-super-linear-backtracking': 'warn',
'regexp/no-unused-capturing-group': 'warn',
'regexp/no-dupe-disjunctions': 'warn',
'regexp/optimal-quantifier-concatenation': 'warn',
},
},
{
files: ['packages/create-valaxy/**/*'],
rules: {
'pnpm/json-enforce-catalog': 'off',
},
},
)