-
Notifications
You must be signed in to change notification settings - Fork 0
/
markuplint.config.js
70 lines (70 loc) · 1.42 KB
/
markuplint.config.js
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
/** @type {import('@markuplint/ml-config').Config} */
export default {
extends: ['@w0s/markuplint-config'],
parser: {
'.ejs$': '@markuplint/ejs-parser',
},
excludeFiles: ['views/feed', 'views/social', 'views/xml'],
rules: {
'disallowed-element': ['base', 'style', 'h5', 'h6', 's', 'i', 'u', 'wbr', 'area'],
'class-naming': [
'/^[lcpu]-([a-z][a-z0-9]*)(-[a-z0-9]+)*(?:__[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:--[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*){0,2}$/',
'/^-([a-z][a-z0-9]*)(-[a-z0-9]+)*$/',
'/^js-([a-z][a-z0-9]*)(-[a-z0-9]+)*$/',
'/^adsbygoogle$/',
],
},
nodeRules: [
{
selector: '[id], ins.adsbygoogle',
rules: {
'no-empty-palpable-content': false,
},
},
{
selector: 'table',
rules: {
'require-accessible-name': false,
'required-element': ['thead'],
},
},
{
selector: 'table.p-post-preview__messages',
rules: {
'required-element': false,
'wai-aria': false,
},
},
],
childNodeRules: [
{
selector: '.p-entry__body',
inheritance: true,
rules: {
'character-reference': false,
},
},
{
selector: '.p-code__code',
inheritance: true,
rules: {
'class-naming': false,
'no-empty-palpable-content': false,
},
},
],
overrideMode: 'merge',
overrides: {
'**/*.ejs': {
rules: {
'permitted-contents': false,
'label-has-control': false,
},
},
'views/list.ejs': {
rules: {
'required-h1': false,
},
},
},
};