eslint-plugin-markdown-preferences 0.19.0 → 0.21.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 +33 -28
- package/lib/index.d.ts +44 -1
- package/lib/index.js +997 -54
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,6 +68,7 @@ export default [
|
|
|
68
68
|
This plugin provides configs:
|
|
69
69
|
|
|
70
70
|
- `*.configs.recommended` ... Recommended config provided by the plugin.
|
|
71
|
+
- `*.configs.standard` ... Enforces opinionated stylistic conventions. You can extend this to enforce any stylistic conventions you like.
|
|
71
72
|
|
|
72
73
|
See [the rule list](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/) to get the `rules` that this plugin provides.
|
|
73
74
|
|
|
@@ -84,7 +85,8 @@ Is not supported.
|
|
|
84
85
|
<!--RULES_SECTION_START-->
|
|
85
86
|
|
|
86
87
|
The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) automatically fixes problems reported by rules which have a wrench 🔧 below.\
|
|
87
|
-
The rules with the following
|
|
88
|
+
The rules with the following ⭐ are included in the `recommended` config.\
|
|
89
|
+
The rules with the following 💄 are included in the `standard` config.
|
|
88
90
|
|
|
89
91
|
<!--RULES_TABLE_START-->
|
|
90
92
|
|
|
@@ -94,12 +96,12 @@ The rules with the following star ⭐ are included in the configs.
|
|
|
94
96
|
|
|
95
97
|
<!-- prettier-ignore-start -->
|
|
96
98
|
|
|
97
|
-
| Rule ID | Description | Fixable |
|
|
99
|
+
| Rule ID | Description | Fixable | Config |
|
|
98
100
|
|:--------|:------------|:-------:|:-----------:|
|
|
99
101
|
| [markdown-preferences/canonical-code-block-language](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/canonical-code-block-language.html) | enforce canonical language names in code blocks | 🔧 | |
|
|
100
102
|
| [markdown-preferences/emoji-notation](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/emoji-notation.html) | enforce consistent emoji notation style in Markdown files. | 🔧 | |
|
|
101
103
|
| [markdown-preferences/heading-casing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/heading-casing.html) | enforce consistent casing in headings. | 🔧 | |
|
|
102
|
-
| [markdown-preferences/ordered-list-marker-start](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-start.html) | enforce that ordered list markers start with 1 or 0 | 🔧 |
|
|
104
|
+
| [markdown-preferences/ordered-list-marker-start](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-start.html) | enforce that ordered list markers start with 1 or 0 | 🔧 | 💄 |
|
|
103
105
|
| [markdown-preferences/prefer-inline-code-words](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-inline-code-words.html) | enforce the use of inline code for specific words. | 🔧 | |
|
|
104
106
|
| [markdown-preferences/prefer-linked-words](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-linked-words.html) | enforce the specified word to be a link. | 🔧 | |
|
|
105
107
|
| [markdown-preferences/table-header-casing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-header-casing.html) | enforce consistent casing in table header cells. | 🔧 | |
|
|
@@ -112,34 +114,37 @@ The rules with the following star ⭐ are included in the configs.
|
|
|
112
114
|
|
|
113
115
|
<!-- prettier-ignore-start -->
|
|
114
116
|
|
|
115
|
-
| Rule ID | Description | Fixable |
|
|
117
|
+
| Rule ID | Description | Fixable | Config |
|
|
116
118
|
|:--------|:------------|:-------:|:-----------:|
|
|
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
|
-
| [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 | 🔧 |
|
|
119
|
+
| [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. | 🔧 | 💄 |
|
|
120
|
+
| [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. | 🔧 | 💄 |
|
|
121
|
+
| [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 | 🔧 | ⭐💄 |
|
|
122
|
+
| [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 | 🔧 | 💄 |
|
|
123
|
+
| [markdown-preferences/code-fence-length](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/code-fence-length.html) | enforce consistent code fence length in fenced code blocks. | 🔧 | 💄 |
|
|
124
|
+
| [markdown-preferences/code-fence-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/code-fence-style.html) | enforce a consistent code fence style (backtick or tilde) in Markdown fenced code blocks. | 🔧 | 💄 |
|
|
121
125
|
| [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 | 🔧 |
|
|
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 | 🔧 |
|
|
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 | 🔧 |
|
|
127
|
-
| [markdown-preferences/no-laziness-blockquotes](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-laziness-blockquotes.html) | disallow laziness in blockquotes | |
|
|
128
|
-
| [markdown-preferences/no-
|
|
129
|
-
| [markdown-preferences/no-
|
|
130
|
-
| [markdown-preferences/no-
|
|
131
|
-
| [markdown-preferences/
|
|
132
|
-
| [markdown-preferences/ordered-list-marker-
|
|
133
|
-
| [markdown-preferences/
|
|
134
|
-
| [markdown-preferences/
|
|
135
|
-
| [markdown-preferences/prefer-
|
|
126
|
+
| [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 | 🔧 | 💄 |
|
|
127
|
+
| [markdown-preferences/hard-linebreak-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/hard-linebreak-style.html) | enforce consistent hard linebreak style. | 🔧 | ⭐💄 |
|
|
128
|
+
| [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 | 🔧 | 💄 |
|
|
129
|
+
| [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 | 🔧 | 💄 |
|
|
130
|
+
| [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 | 🔧 | ⭐💄 |
|
|
131
|
+
| [markdown-preferences/no-laziness-blockquotes](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-laziness-blockquotes.html) | disallow laziness in blockquotes | | ⭐💄 |
|
|
132
|
+
| [markdown-preferences/no-multi-spaces](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-multi-spaces.html) | disallow multiple spaces | 🔧 | 💄 |
|
|
133
|
+
| [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. | 🔧 | 💄 |
|
|
134
|
+
| [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. | | ⭐💄 |
|
|
135
|
+
| [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. | 🔧 | 💄 |
|
|
136
|
+
| [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 | 🔧 | 💄 |
|
|
137
|
+
| [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 | 🔧 | 💄 |
|
|
138
|
+
| [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 | 🔧 | 💄 |
|
|
139
|
+
| [markdown-preferences/prefer-autolinks](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-autolinks.html) | enforce the use of autolinks for URLs | 🔧 | ⭐💄 |
|
|
140
|
+
| [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 | 🔧 | ⭐💄 |
|
|
136
141
|
| [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 | 🔧 | |
|
|
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 | 🔧 |
|
|
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 | 🔧 |
|
|
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. | 🔧 |
|
|
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. | 🔧 |
|
|
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. | 🔧 |
|
|
142
|
+
| [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 | 🔧 | 💄 |
|
|
143
|
+
| [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 | 🔧 | 💄 |
|
|
144
|
+
| [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 | 🔧 | 💄 |
|
|
145
|
+
| [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. | 🔧 | 💄 |
|
|
146
|
+
| [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. | 🔧 | 💄 |
|
|
147
|
+
| [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. | 🔧 | 💄 |
|
|
143
148
|
|
|
144
149
|
<!-- prettier-ignore-end -->
|
|
145
150
|
|
package/lib/index.d.ts
CHANGED
|
@@ -35,6 +35,16 @@ interface RuleOptions {
|
|
|
35
35
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/canonical-code-block-language.html
|
|
36
36
|
*/
|
|
37
37
|
'markdown-preferences/canonical-code-block-language'?: Linter.RuleEntry<MarkdownPreferencesCanonicalCodeBlockLanguage>;
|
|
38
|
+
/**
|
|
39
|
+
* enforce consistent code fence length in fenced code blocks.
|
|
40
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/code-fence-length.html
|
|
41
|
+
*/
|
|
42
|
+
'markdown-preferences/code-fence-length'?: Linter.RuleEntry<MarkdownPreferencesCodeFenceLength>;
|
|
43
|
+
/**
|
|
44
|
+
* enforce a consistent code fence style (backtick or tilde) in Markdown fenced code blocks.
|
|
45
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/code-fence-style.html
|
|
46
|
+
*/
|
|
47
|
+
'markdown-preferences/code-fence-style'?: Linter.RuleEntry<MarkdownPreferencesCodeFenceStyle>;
|
|
38
48
|
/**
|
|
39
49
|
* require link definitions and footnote definitions to be placed at the end of the document
|
|
40
50
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/definitions-last.html
|
|
@@ -80,6 +90,11 @@ interface RuleOptions {
|
|
|
80
90
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-laziness-blockquotes.html
|
|
81
91
|
*/
|
|
82
92
|
'markdown-preferences/no-laziness-blockquotes'?: Linter.RuleEntry<[]>;
|
|
93
|
+
/**
|
|
94
|
+
* disallow multiple spaces
|
|
95
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-multi-spaces.html
|
|
96
|
+
*/
|
|
97
|
+
'markdown-preferences/no-multi-spaces'?: Linter.RuleEntry<[]>;
|
|
83
98
|
/**
|
|
84
99
|
* disallow multiple empty lines in Markdown files.
|
|
85
100
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-multiple-empty-lines.html
|
|
@@ -198,6 +213,18 @@ type MarkdownPreferencesCanonicalCodeBlockLanguage = [] | [{
|
|
|
198
213
|
[k: string]: string;
|
|
199
214
|
};
|
|
200
215
|
}];
|
|
216
|
+
type MarkdownPreferencesCodeFenceLength = [] | [{
|
|
217
|
+
length?: number;
|
|
218
|
+
fallbackLength?: (number | ("minimum" | "as-is"));
|
|
219
|
+
overrides?: {
|
|
220
|
+
lang: string;
|
|
221
|
+
length?: number;
|
|
222
|
+
fallbackLength?: (number | ("minimum" | "as-is"));
|
|
223
|
+
}[];
|
|
224
|
+
}];
|
|
225
|
+
type MarkdownPreferencesCodeFenceStyle = [] | [{
|
|
226
|
+
style?: ("backtick" | "tilde");
|
|
227
|
+
}];
|
|
201
228
|
type MarkdownPreferencesEmojiNotation = [] | [{
|
|
202
229
|
prefer?: ("unicode" | "colon");
|
|
203
230
|
ignoreUnknown?: boolean;
|
|
@@ -329,6 +356,20 @@ type MarkdownPreferencesThematicBreakSequencePattern = [] | [{
|
|
|
329
356
|
pattern: (string | string | string);
|
|
330
357
|
}];
|
|
331
358
|
declare namespace recommended_d_exports {
|
|
359
|
+
export { files$1 as files, language$1 as language, languageOptions$1 as languageOptions, name$2 as name, plugins$1 as plugins, rules$2 as rules };
|
|
360
|
+
}
|
|
361
|
+
declare const name$2 = "markdown-preferences/recommended";
|
|
362
|
+
declare const files$1: string[];
|
|
363
|
+
declare const language$1 = "markdown/gfm";
|
|
364
|
+
declare const languageOptions$1: {
|
|
365
|
+
frontmatter: string;
|
|
366
|
+
};
|
|
367
|
+
declare const plugins$1: {
|
|
368
|
+
markdown: typeof markdown;
|
|
369
|
+
readonly "markdown-preferences": ESLint.Plugin;
|
|
370
|
+
};
|
|
371
|
+
declare const rules$2: Linter.RulesRecord;
|
|
372
|
+
declare namespace standard_d_exports {
|
|
332
373
|
export { files, language, languageOptions, name$1 as name, plugins, rules$1 as rules };
|
|
333
374
|
}
|
|
334
375
|
declare const name$1 = "markdown-preferences/recommended";
|
|
@@ -346,11 +387,12 @@ declare namespace meta_d_exports {
|
|
|
346
387
|
export { name, version };
|
|
347
388
|
}
|
|
348
389
|
declare const name: "eslint-plugin-markdown-preferences";
|
|
349
|
-
declare const version: "0.
|
|
390
|
+
declare const version: "0.21.0";
|
|
350
391
|
//#endregion
|
|
351
392
|
//#region src/index.d.ts
|
|
352
393
|
declare const configs: {
|
|
353
394
|
recommended: typeof recommended_d_exports;
|
|
395
|
+
standard: typeof standard_d_exports;
|
|
354
396
|
};
|
|
355
397
|
declare const rules: Record<string, RuleDefinition>;
|
|
356
398
|
declare const resources: {
|
|
@@ -361,6 +403,7 @@ declare const _default: {
|
|
|
361
403
|
meta: typeof meta_d_exports;
|
|
362
404
|
configs: {
|
|
363
405
|
recommended: typeof recommended_d_exports;
|
|
406
|
+
standard: typeof standard_d_exports;
|
|
364
407
|
};
|
|
365
408
|
rules: Record<string, RuleDefinition<_eslint_core0.RuleDefinitionTypeOptions>>;
|
|
366
409
|
resources: {
|