@d-zero/markuplint-config 5.0.0-alpha.46 → 5.0.0-alpha.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.js +42 -0
- package/package.json +4 -4
package/base.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {import('@markuplint/ml-config').Config}
|
|
3
|
+
*/
|
|
1
4
|
export default {
|
|
2
5
|
extends: ['markuplint:recommended-static-html'],
|
|
6
|
+
rules: {
|
|
7
|
+
'disallowed-element': {
|
|
8
|
+
value: ['br'],
|
|
9
|
+
reason:
|
|
10
|
+
'br要素は原則使用しません。代わりにCSSでスタイルを調整してください。使用する場合は場合は理由が必要です。(D-ZERO独自ルール)',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
3
13
|
nodeRules: [
|
|
4
14
|
{
|
|
5
15
|
selector: "script[src^='https://'], script[src^='https://']",
|
|
@@ -23,5 +33,37 @@ export default {
|
|
|
23
33
|
},
|
|
24
34
|
},
|
|
25
35
|
},
|
|
36
|
+
{
|
|
37
|
+
selector: 'img',
|
|
38
|
+
rules: {
|
|
39
|
+
'required-attr': {
|
|
40
|
+
value: 'alt',
|
|
41
|
+
reason:
|
|
42
|
+
'省略可能なケースがほとんど想定されないため、原則禁止としています。省略する場合は明確な理由が必要です。(D-ZERO独自ルール)',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
selector: 'a',
|
|
48
|
+
rules: {
|
|
49
|
+
'required-attr': {
|
|
50
|
+
value: 'href',
|
|
51
|
+
reason:
|
|
52
|
+
'省略可能なケースがほとんど想定されないため、原則禁止としています。省略する場合は明確な理由が必要です。(D-ZERO独自ルール)',
|
|
53
|
+
},
|
|
54
|
+
'invalid-attr': {
|
|
55
|
+
options: {
|
|
56
|
+
disallowAttrs: [
|
|
57
|
+
{
|
|
58
|
+
name: 'href',
|
|
59
|
+
value: { pattern: '/^javascript:/i' },
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
reason:
|
|
64
|
+
'JavaScriptのリンクは使用しないでください。代わりに`button`要素を使用してください。',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
26
68
|
],
|
|
27
69
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-zero/markuplint-config",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.48",
|
|
4
4
|
"description": "Configurations of Markuplint",
|
|
5
5
|
"repository": "https://github.com/d-zero-dev/linters.git",
|
|
6
6
|
"author": "D-ZERO Co., Ltd.",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"*.js"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@markuplint/pug-parser": "4.6.
|
|
27
|
-
"markuplint": "4.
|
|
26
|
+
"@markuplint/pug-parser": "4.6.11",
|
|
27
|
+
"markuplint": "4.11.1"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "34b440c0567f044afe88131ec139fc0ba66b0f53"
|
|
30
30
|
}
|