eslint-markdown 0.2.0 → 0.3.0
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/build/rules/no-control-character.d.ts +12 -2
- package/build/rules/no-git-conflict-marker.d.ts +12 -2
- package/build/rules/no-irregular-dash.d.ts +12 -2
- package/build/rules/no-irregular-whitespace.d.ts +12 -2
- package/build/rules/no-tab.d.ts +12 -2
- package/package.json +2 -2
- package/src/rules/no-control-character.js +18 -4
- package/src/rules/no-git-conflict-marker.js +17 -3
- package/src/rules/no-irregular-dash.js +18 -4
- package/src/rules/no-irregular-whitespace.js +17 -3
- package/src/rules/no-tab.js +17 -3
|
@@ -18,7 +18,17 @@ declare const _default: {
|
|
|
18
18
|
uniqueItems: true;
|
|
19
19
|
};
|
|
20
20
|
skipCode: {
|
|
21
|
-
|
|
21
|
+
oneOf: ({
|
|
22
|
+
type: "boolean";
|
|
23
|
+
items?: never;
|
|
24
|
+
uniqueItems?: never;
|
|
25
|
+
} | {
|
|
26
|
+
type: "array";
|
|
27
|
+
items: {
|
|
28
|
+
type: "string";
|
|
29
|
+
};
|
|
30
|
+
uniqueItems: true;
|
|
31
|
+
})[];
|
|
22
32
|
};
|
|
23
33
|
skipInlineCode: {
|
|
24
34
|
type: "boolean";
|
|
@@ -52,7 +62,7 @@ declare const _default: {
|
|
|
52
62
|
export default _default;
|
|
53
63
|
export type RuleOptions = [{
|
|
54
64
|
allow: string[];
|
|
55
|
-
skipCode: boolean;
|
|
65
|
+
skipCode: boolean | string[];
|
|
56
66
|
skipInlineCode: boolean;
|
|
57
67
|
}];
|
|
58
68
|
export type MessageIds = "noControlCharacter";
|
|
@@ -11,7 +11,17 @@ declare const _default: {
|
|
|
11
11
|
type: "object";
|
|
12
12
|
properties: {
|
|
13
13
|
skipCode: {
|
|
14
|
-
|
|
14
|
+
oneOf: ({
|
|
15
|
+
type: "boolean";
|
|
16
|
+
items?: never;
|
|
17
|
+
uniqueItems?: never;
|
|
18
|
+
} | {
|
|
19
|
+
type: "array";
|
|
20
|
+
items: {
|
|
21
|
+
type: "string";
|
|
22
|
+
};
|
|
23
|
+
uniqueItems: true;
|
|
24
|
+
})[];
|
|
15
25
|
};
|
|
16
26
|
};
|
|
17
27
|
additionalProperties: false;
|
|
@@ -38,6 +48,6 @@ declare const _default: {
|
|
|
38
48
|
};
|
|
39
49
|
export default _default;
|
|
40
50
|
export type RuleOptions = [{
|
|
41
|
-
skipCode: boolean;
|
|
51
|
+
skipCode: boolean | string[];
|
|
42
52
|
}];
|
|
43
53
|
export type MessageIds = "noGitConflictMarker";
|
|
@@ -18,7 +18,17 @@ declare const _default: {
|
|
|
18
18
|
uniqueItems: true;
|
|
19
19
|
};
|
|
20
20
|
skipCode: {
|
|
21
|
-
|
|
21
|
+
oneOf: ({
|
|
22
|
+
type: "boolean";
|
|
23
|
+
items?: never;
|
|
24
|
+
uniqueItems?: never;
|
|
25
|
+
} | {
|
|
26
|
+
type: "array";
|
|
27
|
+
items: {
|
|
28
|
+
type: "string";
|
|
29
|
+
};
|
|
30
|
+
uniqueItems: true;
|
|
31
|
+
})[];
|
|
22
32
|
};
|
|
23
33
|
skipInlineCode: {
|
|
24
34
|
type: "boolean";
|
|
@@ -52,7 +62,7 @@ declare const _default: {
|
|
|
52
62
|
export default _default;
|
|
53
63
|
export type RuleOptions = [{
|
|
54
64
|
allow: string[];
|
|
55
|
-
skipCode: boolean;
|
|
65
|
+
skipCode: boolean | string[];
|
|
56
66
|
skipInlineCode: boolean;
|
|
57
67
|
}];
|
|
58
68
|
export type MessageIds = "noIrregularDash";
|
|
@@ -18,7 +18,17 @@ declare const _default: {
|
|
|
18
18
|
uniqueItems: true;
|
|
19
19
|
};
|
|
20
20
|
skipCode: {
|
|
21
|
-
|
|
21
|
+
oneOf: ({
|
|
22
|
+
type: "boolean";
|
|
23
|
+
items?: never;
|
|
24
|
+
uniqueItems?: never;
|
|
25
|
+
} | {
|
|
26
|
+
type: "array";
|
|
27
|
+
items: {
|
|
28
|
+
type: "string";
|
|
29
|
+
};
|
|
30
|
+
uniqueItems: true;
|
|
31
|
+
})[];
|
|
22
32
|
};
|
|
23
33
|
skipInlineCode: {
|
|
24
34
|
type: "boolean";
|
|
@@ -52,7 +62,7 @@ declare const _default: {
|
|
|
52
62
|
export default _default;
|
|
53
63
|
export type RuleOptions = [{
|
|
54
64
|
allow: string[];
|
|
55
|
-
skipCode: boolean;
|
|
65
|
+
skipCode: boolean | string[];
|
|
56
66
|
skipInlineCode: boolean;
|
|
57
67
|
}];
|
|
58
68
|
export type MessageIds = "noIrregularWhitespace";
|
package/build/rules/no-tab.d.ts
CHANGED
|
@@ -12,7 +12,17 @@ declare const _default: {
|
|
|
12
12
|
type: "object";
|
|
13
13
|
properties: {
|
|
14
14
|
skipCode: {
|
|
15
|
-
|
|
15
|
+
oneOf: ({
|
|
16
|
+
type: "boolean";
|
|
17
|
+
items?: never;
|
|
18
|
+
uniqueItems?: never;
|
|
19
|
+
} | {
|
|
20
|
+
type: "array";
|
|
21
|
+
items: {
|
|
22
|
+
type: "string";
|
|
23
|
+
};
|
|
24
|
+
uniqueItems: true;
|
|
25
|
+
})[];
|
|
16
26
|
};
|
|
17
27
|
skipInlineCode: {
|
|
18
28
|
type: "boolean";
|
|
@@ -49,7 +59,7 @@ declare const _default: {
|
|
|
49
59
|
};
|
|
50
60
|
export default _default;
|
|
51
61
|
export type RuleOptions = [{
|
|
52
|
-
skipCode: boolean;
|
|
62
|
+
skipCode: boolean | string[];
|
|
53
63
|
skipInlineCode: boolean;
|
|
54
64
|
tabWidth: number;
|
|
55
65
|
}];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-markdown",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Lint your Markdown with ESLint.🛠️",
|
|
6
6
|
"exports": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"test:unit": "node --test"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"eslint": "^9.31.0 || ^10.0.0-
|
|
67
|
+
"eslint": "^9.31.0 || ^10.0.0-rc.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependenciesMeta": {
|
|
70
70
|
"eslint": {
|
|
@@ -16,7 +16,7 @@ import { URL_RULE_DOCS } from '../core/constants.js';
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @import { RuleModule } from '../core/types.js';
|
|
19
|
-
* @typedef {[{ allow: string[], skipCode: boolean, skipInlineCode: boolean }]} RuleOptions
|
|
19
|
+
* @typedef {[{ allow: string[], skipCode: boolean | string[], skipInlineCode: boolean }]} RuleOptions
|
|
20
20
|
* @typedef {'noControlCharacter'} MessageIds
|
|
21
21
|
*/
|
|
22
22
|
|
|
@@ -55,7 +55,18 @@ export default {
|
|
|
55
55
|
uniqueItems: true,
|
|
56
56
|
},
|
|
57
57
|
skipCode: {
|
|
58
|
-
|
|
58
|
+
oneOf: [
|
|
59
|
+
{
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'array',
|
|
64
|
+
items: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
},
|
|
67
|
+
uniqueItems: true,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
59
70
|
},
|
|
60
71
|
skipInlineCode: {
|
|
61
72
|
type: 'boolean',
|
|
@@ -90,11 +101,14 @@ export default {
|
|
|
90
101
|
|
|
91
102
|
return {
|
|
92
103
|
code(node) {
|
|
93
|
-
if (
|
|
104
|
+
if (
|
|
105
|
+
Array.isArray(skipCode) ? node.lang && skipCode.includes(node.lang) : skipCode
|
|
106
|
+
)
|
|
107
|
+
skipRanges.push(sourceCode.getRange(node)); // Store range information of `Code`.
|
|
94
108
|
},
|
|
95
109
|
|
|
96
110
|
inlineCode(node) {
|
|
97
|
-
if (skipInlineCode) skipRanges.push(sourceCode.getRange(node)); // Store
|
|
111
|
+
if (skipInlineCode) skipRanges.push(sourceCode.getRange(node)); // Store range information of `InlineCode`.
|
|
98
112
|
},
|
|
99
113
|
|
|
100
114
|
'root:exit'() {
|
|
@@ -16,7 +16,7 @@ import { URL_RULE_DOCS } from '../core/constants.js';
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @import { RuleModule } from '../core/types.js';
|
|
19
|
-
* @typedef {[{ skipCode: boolean }]} RuleOptions
|
|
19
|
+
* @typedef {[{ skipCode: boolean | string[] }]} RuleOptions
|
|
20
20
|
* @typedef {'noGitConflictMarker'} MessageIds
|
|
21
21
|
*/
|
|
22
22
|
|
|
@@ -47,7 +47,18 @@ export default {
|
|
|
47
47
|
type: 'object',
|
|
48
48
|
properties: {
|
|
49
49
|
skipCode: {
|
|
50
|
-
|
|
50
|
+
oneOf: [
|
|
51
|
+
{
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: 'array',
|
|
56
|
+
items: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
},
|
|
59
|
+
uniqueItems: true,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
51
62
|
},
|
|
52
63
|
},
|
|
53
64
|
additionalProperties: false,
|
|
@@ -78,7 +89,10 @@ export default {
|
|
|
78
89
|
|
|
79
90
|
return {
|
|
80
91
|
code(node) {
|
|
81
|
-
if (
|
|
92
|
+
if (
|
|
93
|
+
Array.isArray(skipCode) ? node.lang && skipCode.includes(node.lang) : skipCode
|
|
94
|
+
)
|
|
95
|
+
skipRanges.push(sourceCode.getRange(node)); // Store range information of `Code`.
|
|
82
96
|
},
|
|
83
97
|
|
|
84
98
|
'root:exit'() {
|
|
@@ -16,7 +16,7 @@ import { URL_RULE_DOCS } from '../core/constants.js';
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @import { RuleModule } from '../core/types.js';
|
|
19
|
-
* @typedef {[{ allow: string[], skipCode: boolean, skipInlineCode: boolean }]} RuleOptions
|
|
19
|
+
* @typedef {[{ allow: string[], skipCode: boolean | string[], skipInlineCode: boolean }]} RuleOptions
|
|
20
20
|
* @typedef {'noIrregularDash'} MessageIds
|
|
21
21
|
*/
|
|
22
22
|
|
|
@@ -55,7 +55,18 @@ export default {
|
|
|
55
55
|
uniqueItems: true,
|
|
56
56
|
},
|
|
57
57
|
skipCode: {
|
|
58
|
-
|
|
58
|
+
oneOf: [
|
|
59
|
+
{
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'array',
|
|
64
|
+
items: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
},
|
|
67
|
+
uniqueItems: true,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
59
70
|
},
|
|
60
71
|
skipInlineCode: {
|
|
61
72
|
type: 'boolean',
|
|
@@ -90,11 +101,14 @@ export default {
|
|
|
90
101
|
|
|
91
102
|
return {
|
|
92
103
|
code(node) {
|
|
93
|
-
if (
|
|
104
|
+
if (
|
|
105
|
+
Array.isArray(skipCode) ? node.lang && skipCode.includes(node.lang) : skipCode
|
|
106
|
+
)
|
|
107
|
+
skipRanges.push(sourceCode.getRange(node)); // Store range information of `Code`.
|
|
94
108
|
},
|
|
95
109
|
|
|
96
110
|
inlineCode(node) {
|
|
97
|
-
if (skipInlineCode) skipRanges.push(sourceCode.getRange(node)); // Store
|
|
111
|
+
if (skipInlineCode) skipRanges.push(sourceCode.getRange(node)); // Store range information of `InlineCode`.
|
|
98
112
|
},
|
|
99
113
|
|
|
100
114
|
'root:exit'() {
|
|
@@ -16,7 +16,7 @@ import { URL_RULE_DOCS } from '../core/constants.js';
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @import { RuleModule } from '../core/types.js';
|
|
19
|
-
* @typedef {[{ allow: string[], skipCode: boolean, skipInlineCode: boolean }]} RuleOptions
|
|
19
|
+
* @typedef {[{ allow: string[], skipCode: boolean | string[], skipInlineCode: boolean }]} RuleOptions
|
|
20
20
|
* @typedef {'noIrregularWhitespace'} MessageIds
|
|
21
21
|
*/
|
|
22
22
|
|
|
@@ -55,7 +55,18 @@ export default {
|
|
|
55
55
|
uniqueItems: true,
|
|
56
56
|
},
|
|
57
57
|
skipCode: {
|
|
58
|
-
|
|
58
|
+
oneOf: [
|
|
59
|
+
{
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'array',
|
|
64
|
+
items: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
},
|
|
67
|
+
uniqueItems: true,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
59
70
|
},
|
|
60
71
|
skipInlineCode: {
|
|
61
72
|
type: 'boolean',
|
|
@@ -91,7 +102,10 @@ export default {
|
|
|
91
102
|
|
|
92
103
|
return {
|
|
93
104
|
code(node) {
|
|
94
|
-
if (
|
|
105
|
+
if (
|
|
106
|
+
Array.isArray(skipCode) ? node.lang && skipCode.includes(node.lang) : skipCode
|
|
107
|
+
)
|
|
108
|
+
skipRanges.push(sourceCode.getRange(node)); // Store range information of `Code`.
|
|
95
109
|
},
|
|
96
110
|
|
|
97
111
|
inlineCode(node) {
|
package/src/rules/no-tab.js
CHANGED
|
@@ -16,7 +16,7 @@ import { URL_RULE_DOCS } from '../core/constants.js';
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @import { RuleModule } from '../core/types.js';
|
|
19
|
-
* @typedef {[{ skipCode: boolean, skipInlineCode: boolean, tabWidth: number }]} RuleOptions
|
|
19
|
+
* @typedef {[{ skipCode: boolean | string[], skipInlineCode: boolean, tabWidth: number }]} RuleOptions
|
|
20
20
|
* @typedef {'noTab'} MessageIds
|
|
21
21
|
*/
|
|
22
22
|
|
|
@@ -49,7 +49,18 @@ export default {
|
|
|
49
49
|
type: 'object',
|
|
50
50
|
properties: {
|
|
51
51
|
skipCode: {
|
|
52
|
-
|
|
52
|
+
oneOf: [
|
|
53
|
+
{
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'array',
|
|
58
|
+
items: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
},
|
|
61
|
+
uniqueItems: true,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
53
64
|
},
|
|
54
65
|
skipInlineCode: {
|
|
55
66
|
type: 'boolean',
|
|
@@ -88,7 +99,10 @@ export default {
|
|
|
88
99
|
|
|
89
100
|
return {
|
|
90
101
|
code(node) {
|
|
91
|
-
if (
|
|
102
|
+
if (
|
|
103
|
+
Array.isArray(skipCode) ? node.lang && skipCode.includes(node.lang) : skipCode
|
|
104
|
+
)
|
|
105
|
+
skipRanges.push(sourceCode.getRange(node)); // Store range information of `Code`.
|
|
92
106
|
},
|
|
93
107
|
|
|
94
108
|
inlineCode(node) {
|