eslint-plugin-markdown-preferences 0.17.0 → 0.19.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/README.md +8 -2
- package/lib/index.d.ts +83 -7
- package/lib/index.js +1083 -240
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -114,23 +114,29 @@ The rules with the following star ⭐ are included in the configs.
|
|
|
114
114
|
|
|
115
115
|
| Rule ID | Description | Fixable | RECOMMENDED |
|
|
116
116
|
|:--------|:------------|:-------:|:-----------:|
|
|
117
|
-
| [markdown-preferences/atx-
|
|
118
|
-
| [markdown-preferences/atx-
|
|
117
|
+
| [markdown-preferences/atx-heading-closing-sequence-length](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/atx-heading-closing-sequence-length.html) | enforce consistent length for the closing sequence (trailing #s) in ATX headings. | 🔧 | |
|
|
118
|
+
| [markdown-preferences/atx-heading-closing-sequence](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/atx-heading-closing-sequence.html) | enforce consistent use of closing sequence in ATX headings. | 🔧 | |
|
|
119
119
|
| [markdown-preferences/blockquote-marker-alignment](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/blockquote-marker-alignment.html) | enforce consistent alignment of blockquote markers | 🔧 | ⭐ |
|
|
120
|
+
| [markdown-preferences/bullet-list-marker-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/bullet-list-marker-style.html) | enforce consistent bullet list (unordered list) marker style | 🔧 | |
|
|
120
121
|
| [markdown-preferences/definitions-last](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/definitions-last.html) | require link definitions and footnote definitions to be placed at the end of the document | 🔧 | |
|
|
122
|
+
| [markdown-preferences/emphasis-delimiters-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/emphasis-delimiters-style.html) | enforce a consistent delimiter style for emphasis and strong emphasis | 🔧 | |
|
|
121
123
|
| [markdown-preferences/hard-linebreak-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/hard-linebreak-style.html) | enforce consistent hard linebreak style. | 🔧 | ⭐ |
|
|
124
|
+
| [markdown-preferences/level1-heading-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/level1-heading-style.html) | enforce consistent style for level 1 headings | 🔧 | |
|
|
125
|
+
| [markdown-preferences/level2-heading-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/level2-heading-style.html) | enforce consistent style for level 2 headings | 🔧 | |
|
|
122
126
|
| [markdown-preferences/list-marker-alignment](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/list-marker-alignment.html) | enforce consistent alignment of list markers | 🔧 | ⭐ |
|
|
123
127
|
| [markdown-preferences/no-laziness-blockquotes](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-laziness-blockquotes.html) | disallow laziness in blockquotes | | ⭐ |
|
|
124
128
|
| [markdown-preferences/no-multiple-empty-lines](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-multiple-empty-lines.html) | disallow multiple empty lines in Markdown files. | 🔧 | |
|
|
125
129
|
| [markdown-preferences/no-text-backslash-linebreak](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-text-backslash-linebreak.html) | disallow text backslash at the end of a line. | | ⭐ |
|
|
126
130
|
| [markdown-preferences/no-trailing-spaces](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-trailing-spaces.html) | disallow trailing whitespace at the end of lines in Markdown files. | 🔧 | |
|
|
127
131
|
| [markdown-preferences/ordered-list-marker-sequence](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-sequence.html) | enforce that ordered list markers use sequential numbers | 🔧 | |
|
|
132
|
+
| [markdown-preferences/ordered-list-marker-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-style.html) | enforce consistent ordered list marker style | 🔧 | |
|
|
128
133
|
| [markdown-preferences/padding-line-between-blocks](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/padding-line-between-blocks.html) | require or disallow padding lines between blocks | 🔧 | ⭐ |
|
|
129
134
|
| [markdown-preferences/prefer-autolinks](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-autolinks.html) | enforce the use of autolinks for URLs | 🔧 | ⭐ |
|
|
130
135
|
| [markdown-preferences/prefer-fenced-code-blocks](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-fenced-code-blocks.html) | enforce the use of fenced code blocks over indented code blocks | 🔧 | ⭐ |
|
|
131
136
|
| [markdown-preferences/prefer-link-reference-definitions](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-link-reference-definitions.html) | enforce using link reference definitions instead of inline links | 🔧 | |
|
|
132
137
|
| [markdown-preferences/setext-heading-underline-length](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/setext-heading-underline-length.html) | enforce setext heading underline length | 🔧 | |
|
|
133
138
|
| [markdown-preferences/sort-definitions](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/sort-definitions.html) | enforce a specific order for link definitions and footnote definitions | 🔧 | |
|
|
139
|
+
| [markdown-preferences/strikethrough-delimiters-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/strikethrough-delimiters-style.html) | enforce a consistent delimiter style for strikethrough | 🔧 | |
|
|
134
140
|
| [markdown-preferences/thematic-break-character-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/thematic-break-character-style.html) | enforce consistent character style for thematic breaks (horizontal rules) in Markdown. | 🔧 | |
|
|
135
141
|
| [markdown-preferences/thematic-break-length](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/thematic-break-length.html) | enforce consistent length for thematic breaks (horizontal rules) in Markdown. | 🔧 | |
|
|
136
142
|
| [markdown-preferences/thematic-break-sequence-pattern](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/thematic-break-sequence-pattern.html) | enforce consistent repeating patterns for thematic breaks (horizontal rules) in Markdown. | 🔧 | |
|
package/lib/index.d.ts
CHANGED
|
@@ -12,19 +12,24 @@ declare module 'eslint' {
|
|
|
12
12
|
interface RuleOptions {
|
|
13
13
|
/**
|
|
14
14
|
* enforce consistent use of closing sequence in ATX headings.
|
|
15
|
-
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/atx-
|
|
15
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/atx-heading-closing-sequence.html
|
|
16
16
|
*/
|
|
17
|
-
'markdown-preferences/atx-
|
|
17
|
+
'markdown-preferences/atx-heading-closing-sequence'?: Linter.RuleEntry<MarkdownPreferencesAtxHeadingClosingSequence>;
|
|
18
18
|
/**
|
|
19
19
|
* enforce consistent length for the closing sequence (trailing #s) in ATX headings.
|
|
20
|
-
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/atx-
|
|
20
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/atx-heading-closing-sequence-length.html
|
|
21
21
|
*/
|
|
22
|
-
'markdown-preferences/atx-
|
|
22
|
+
'markdown-preferences/atx-heading-closing-sequence-length'?: Linter.RuleEntry<MarkdownPreferencesAtxHeadingClosingSequenceLength>;
|
|
23
23
|
/**
|
|
24
24
|
* enforce consistent alignment of blockquote markers
|
|
25
25
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/blockquote-marker-alignment.html
|
|
26
26
|
*/
|
|
27
27
|
'markdown-preferences/blockquote-marker-alignment'?: Linter.RuleEntry<[]>;
|
|
28
|
+
/**
|
|
29
|
+
* enforce consistent bullet list (unordered list) marker style
|
|
30
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/bullet-list-marker-style.html
|
|
31
|
+
*/
|
|
32
|
+
'markdown-preferences/bullet-list-marker-style'?: Linter.RuleEntry<MarkdownPreferencesBulletListMarkerStyle>;
|
|
28
33
|
/**
|
|
29
34
|
* enforce canonical language names in code blocks
|
|
30
35
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/canonical-code-block-language.html
|
|
@@ -40,6 +45,11 @@ interface RuleOptions {
|
|
|
40
45
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/emoji-notation.html
|
|
41
46
|
*/
|
|
42
47
|
'markdown-preferences/emoji-notation'?: Linter.RuleEntry<MarkdownPreferencesEmojiNotation>;
|
|
48
|
+
/**
|
|
49
|
+
* enforce a consistent delimiter style for emphasis and strong emphasis
|
|
50
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/emphasis-delimiters-style.html
|
|
51
|
+
*/
|
|
52
|
+
'markdown-preferences/emphasis-delimiters-style'?: Linter.RuleEntry<MarkdownPreferencesEmphasisDelimitersStyle>;
|
|
43
53
|
/**
|
|
44
54
|
* enforce consistent hard linebreak style.
|
|
45
55
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/hard-linebreak-style.html
|
|
@@ -50,6 +60,16 @@ interface RuleOptions {
|
|
|
50
60
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/heading-casing.html
|
|
51
61
|
*/
|
|
52
62
|
'markdown-preferences/heading-casing'?: Linter.RuleEntry<MarkdownPreferencesHeadingCasing>;
|
|
63
|
+
/**
|
|
64
|
+
* enforce consistent style for level 1 headings
|
|
65
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/level1-heading-style.html
|
|
66
|
+
*/
|
|
67
|
+
'markdown-preferences/level1-heading-style'?: Linter.RuleEntry<MarkdownPreferencesLevel1HeadingStyle>;
|
|
68
|
+
/**
|
|
69
|
+
* enforce consistent style for level 2 headings
|
|
70
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/level2-heading-style.html
|
|
71
|
+
*/
|
|
72
|
+
'markdown-preferences/level2-heading-style'?: Linter.RuleEntry<MarkdownPreferencesLevel2HeadingStyle>;
|
|
53
73
|
/**
|
|
54
74
|
* enforce consistent alignment of list markers
|
|
55
75
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/list-marker-alignment.html
|
|
@@ -85,6 +105,11 @@ interface RuleOptions {
|
|
|
85
105
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-start.html
|
|
86
106
|
*/
|
|
87
107
|
'markdown-preferences/ordered-list-marker-start'?: Linter.RuleEntry<MarkdownPreferencesOrderedListMarkerStart>;
|
|
108
|
+
/**
|
|
109
|
+
* enforce consistent ordered list marker style
|
|
110
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-style.html
|
|
111
|
+
*/
|
|
112
|
+
'markdown-preferences/ordered-list-marker-style'?: Linter.RuleEntry<MarkdownPreferencesOrderedListMarkerStyle>;
|
|
88
113
|
/**
|
|
89
114
|
* require or disallow padding lines between blocks
|
|
90
115
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/padding-line-between-blocks.html
|
|
@@ -125,6 +150,11 @@ interface RuleOptions {
|
|
|
125
150
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/sort-definitions.html
|
|
126
151
|
*/
|
|
127
152
|
'markdown-preferences/sort-definitions'?: Linter.RuleEntry<MarkdownPreferencesSortDefinitions>;
|
|
153
|
+
/**
|
|
154
|
+
* enforce a consistent delimiter style for strikethrough
|
|
155
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/strikethrough-delimiters-style.html
|
|
156
|
+
*/
|
|
157
|
+
'markdown-preferences/strikethrough-delimiters-style'?: Linter.RuleEntry<MarkdownPreferencesStrikethroughDelimitersStyle>;
|
|
128
158
|
/**
|
|
129
159
|
* enforce consistent casing in table header cells.
|
|
130
160
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-header-casing.html
|
|
@@ -146,13 +176,23 @@ interface RuleOptions {
|
|
|
146
176
|
*/
|
|
147
177
|
'markdown-preferences/thematic-break-sequence-pattern'?: Linter.RuleEntry<MarkdownPreferencesThematicBreakSequencePattern>;
|
|
148
178
|
}
|
|
149
|
-
type
|
|
179
|
+
type MarkdownPreferencesAtxHeadingClosingSequence = [] | [{
|
|
150
180
|
closingSequence?: ("always" | "never");
|
|
151
181
|
}];
|
|
152
|
-
type
|
|
182
|
+
type MarkdownPreferencesAtxHeadingClosingSequenceLength = [] | [{
|
|
153
183
|
mode?: ("match-opening" | "length" | "consistent" | "consistent-line-length" | "fixed-line-length");
|
|
154
184
|
length?: number;
|
|
155
185
|
}];
|
|
186
|
+
type MarkdownPreferencesBulletListMarkerStyle = [] | [{
|
|
187
|
+
primary?: ("-" | "*" | "+");
|
|
188
|
+
secondary?: ("-" | "*" | "+" | "any");
|
|
189
|
+
overrides?: {
|
|
190
|
+
level?: number;
|
|
191
|
+
parentMarker?: ("-" | "*" | "+" | "any" | "ordered");
|
|
192
|
+
primary?: ("-" | "*" | "+");
|
|
193
|
+
secondary?: ("-" | "*" | "+" | "any");
|
|
194
|
+
}[];
|
|
195
|
+
}];
|
|
156
196
|
type MarkdownPreferencesCanonicalCodeBlockLanguage = [] | [{
|
|
157
197
|
languages?: {
|
|
158
198
|
[k: string]: string;
|
|
@@ -163,6 +203,23 @@ type MarkdownPreferencesEmojiNotation = [] | [{
|
|
|
163
203
|
ignoreUnknown?: boolean;
|
|
164
204
|
ignoreList?: string[];
|
|
165
205
|
}];
|
|
206
|
+
type MarkdownPreferencesEmphasisDelimitersStyle = [] | [{
|
|
207
|
+
emphasis?: ("*" | "_");
|
|
208
|
+
strong?: ("**" | "__");
|
|
209
|
+
strongEmphasis?: (("***" | "___") | {
|
|
210
|
+
outer: "*";
|
|
211
|
+
inner: "__";
|
|
212
|
+
} | {
|
|
213
|
+
outer: "**";
|
|
214
|
+
inner: "_";
|
|
215
|
+
} | {
|
|
216
|
+
outer: "_";
|
|
217
|
+
inner: "**";
|
|
218
|
+
} | {
|
|
219
|
+
outer: "__";
|
|
220
|
+
inner: "*";
|
|
221
|
+
});
|
|
222
|
+
}];
|
|
166
223
|
type MarkdownPreferencesHardLinebreakStyle = [] | [{
|
|
167
224
|
style?: ("backslash" | "spaces");
|
|
168
225
|
}];
|
|
@@ -172,6 +229,14 @@ type MarkdownPreferencesHeadingCasing = [] | [{
|
|
|
172
229
|
ignorePatterns?: string[];
|
|
173
230
|
minorWords?: string[];
|
|
174
231
|
}];
|
|
232
|
+
type MarkdownPreferencesLevel1HeadingStyle = [] | [{
|
|
233
|
+
style?: ("atx" | "setext");
|
|
234
|
+
allowMultilineSetext?: boolean;
|
|
235
|
+
}];
|
|
236
|
+
type MarkdownPreferencesLevel2HeadingStyle = [] | [{
|
|
237
|
+
style?: ("atx" | "setext");
|
|
238
|
+
allowMultilineSetext?: boolean;
|
|
239
|
+
}];
|
|
175
240
|
type MarkdownPreferencesListMarkerAlignment = [] | [{
|
|
176
241
|
align?: ("left" | "right");
|
|
177
242
|
}];
|
|
@@ -187,6 +252,14 @@ type MarkdownPreferencesNoTrailingSpaces = [] | [{
|
|
|
187
252
|
type MarkdownPreferencesOrderedListMarkerStart = [] | [{
|
|
188
253
|
start?: (1 | 0);
|
|
189
254
|
}];
|
|
255
|
+
type MarkdownPreferencesOrderedListMarkerStyle = [] | [{
|
|
256
|
+
prefer?: ("n." | "n)");
|
|
257
|
+
overrides?: {
|
|
258
|
+
level?: number;
|
|
259
|
+
parentMarker?: ("n." | "n)" | "any" | "bullet");
|
|
260
|
+
prefer?: ("n." | "n)");
|
|
261
|
+
}[];
|
|
262
|
+
}];
|
|
190
263
|
type MarkdownPreferencesPaddingLineBetweenBlocks = {
|
|
191
264
|
prev: (("blockquote" | "code" | "heading" | "html" | "list" | "paragraph" | "thematic-break" | "table" | "link-definition" | "footnote-definition" | "frontmatter" | "*") | [("blockquote" | "code" | "heading" | "html" | "list" | "paragraph" | "thematic-break" | "table" | "link-definition" | "footnote-definition" | "frontmatter" | "*"), ...(("blockquote" | "code" | "heading" | "html" | "list" | "paragraph" | "thematic-break" | "table" | "link-definition" | "footnote-definition" | "frontmatter" | "*"))[]] | {
|
|
192
265
|
type: (("blockquote" | "code" | "heading" | "html" | "list" | "paragraph" | "thematic-break" | "table" | "link-definition" | "footnote-definition" | "frontmatter" | "*") | [("blockquote" | "code" | "heading" | "html" | "list" | "paragraph" | "thematic-break" | "table" | "link-definition" | "footnote-definition" | "frontmatter" | "*"), ...(("blockquote" | "code" | "heading" | "html" | "list" | "paragraph" | "thematic-break" | "table" | "link-definition" | "footnote-definition" | "frontmatter" | "*"))[]]);
|
|
@@ -237,6 +310,9 @@ type MarkdownPreferencesSortDefinitions = [] | [{
|
|
|
237
310
|
})[];
|
|
238
311
|
alphabetical?: boolean;
|
|
239
312
|
}];
|
|
313
|
+
type MarkdownPreferencesStrikethroughDelimitersStyle = [] | [{
|
|
314
|
+
delimiter?: ("~" | "~~");
|
|
315
|
+
}];
|
|
240
316
|
type MarkdownPreferencesTableHeaderCasing = [] | [{
|
|
241
317
|
style?: ("Title Case" | "Sentence case");
|
|
242
318
|
preserveWords?: string[];
|
|
@@ -270,7 +346,7 @@ declare namespace meta_d_exports {
|
|
|
270
346
|
export { name, version };
|
|
271
347
|
}
|
|
272
348
|
declare const name: "eslint-plugin-markdown-preferences";
|
|
273
|
-
declare const version: "0.
|
|
349
|
+
declare const version: "0.19.0";
|
|
274
350
|
//#endregion
|
|
275
351
|
//#region src/index.d.ts
|
|
276
352
|
declare const configs: {
|