-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy patheslint.config.ts
More file actions
62 lines (60 loc) · 1.92 KB
/
Copy patheslint.config.ts
File metadata and controls
62 lines (60 loc) · 1.92 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
import { fileURLToPath } from 'node:url';
import markdown from '@eslint/markdown';
import { defineConfig, includeIgnoreFile } from 'eslint/config';
export default defineConfig([
includeIgnoreFile(fileURLToPath(import.meta.resolve('./.gitignore')), {
gitignoreResolution: true
}),
{
name: 'markdown',
files: ['**/*.md'],
plugins: {
markdown
},
language: 'markdown/gfm',
linterOptions: {
reportUnusedInlineConfigs: 'warn'
},
rules: {
// `@eslint/markdown` rules
// https://github.com/eslint/markdown/blob/main/README.md#rules
/*
// copy all the rules from the rules table for easy pasting
copy(
Iterator.from(
document
// select rules table
.querySelector('.markdown-heading:has(> a[href="#rules"]) ~ markdown-accessiblity-table tbody')
// select all rule links
.querySelectorAll(':any-link')
)
// map link to rule declaration
.map((link) => `'markdown/${link.textContent}': 1,`)
.toArray()
.join('\n')
);
*/
'markdown/fenced-code-language': 1,
'markdown/fenced-code-meta': 0,
'markdown/heading-increment': 1,
'markdown/no-bare-urls': 1,
'markdown/no-duplicate-definitions': 1,
'markdown/no-duplicate-headings': [1, { checkSiblingsOnly: true }],
'markdown/no-empty-definitions': 1,
'markdown/no-empty-images': 1,
'markdown/no-empty-links': 1,
'markdown/no-html': [1, { allowed: ['kbd'] }],
'markdown/no-invalid-label-refs': 1,
'markdown/no-missing-atx-heading-space': 1,
'markdown/no-missing-label-refs': 1,
'markdown/no-missing-link-fragments': 1,
'markdown/no-multiple-h1': 1,
'markdown/no-reference-like-urls': 1,
'markdown/no-reversed-media-syntax': 1,
'markdown/no-space-in-emphasis': 1,
'markdown/no-unused-definitions': 1,
'markdown/require-alt-text': 1,
'markdown/table-column-count': 1
}
}
]);