eslint-plugin-markdown-preferences 0.11.0 → 0.13.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 +6 -1
- package/lib/index.d.ts +41 -1
- package/lib/index.js +2730 -160
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -93,7 +93,10 @@ The rules with the following star ⭐ are included in the configs.
|
|
|
93
93
|
| Rule ID | Description | Fixable | RECOMMENDED |
|
|
94
94
|
|:--------|:------------|:-------:|:-----------:|
|
|
95
95
|
| [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 | 🔧 | |
|
|
96
|
+
| [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. | 🔧 | |
|
|
97
|
+
| [markdown-preferences/heading-casing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/heading-casing.html) | enforce consistent casing in headings. | 🔧 | |
|
|
96
98
|
| [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. | | ⭐ |
|
|
99
|
+
| [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 | 🔧 | |
|
|
97
100
|
| [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. | 🔧 | |
|
|
98
101
|
| [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. | 🔧 | |
|
|
99
102
|
|
|
@@ -101,12 +104,14 @@ The rules with the following star ⭐ are included in the configs.
|
|
|
101
104
|
|
|
102
105
|
| Rule ID | Description | Fixable | RECOMMENDED |
|
|
103
106
|
|:--------|:------------|:-------:|:-----------:|
|
|
107
|
+
| [markdown-preferences/atx-headings-closing-sequence-length](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/atx-headings-closing-sequence-length.html) | enforce consistent length for the closing sequence (trailing #s) in ATX headings. | 🔧 | |
|
|
108
|
+
| [markdown-preferences/atx-headings-closing-sequence](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/atx-headings-closing-sequence.html) | enforce consistent use of closing sequence in ATX headings. | 🔧 | |
|
|
104
109
|
| [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 | 🔧 | |
|
|
105
110
|
| [markdown-preferences/hard-linebreak-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/hard-linebreak-style.html) | enforce consistent hard linebreak style. | 🔧 | ⭐ |
|
|
106
|
-
| [markdown-preferences/heading-casing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/heading-casing.html) | enforce consistent casing in headings. | 🔧 | |
|
|
107
111
|
| [markdown-preferences/no-laziness-blockquotes](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-laziness-blockquotes.html) | disallow laziness in blockquotes | | ⭐ |
|
|
108
112
|
| [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. | 🔧 | |
|
|
109
113
|
| [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. | 🔧 | |
|
|
114
|
+
| [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 | 🔧 | |
|
|
110
115
|
| [markdown-preferences/prefer-autolinks](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-autolinks.html) | enforce the use of autolinks for URLs | 🔧 | ⭐ |
|
|
111
116
|
| [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 | 🔧 | ⭐ |
|
|
112
117
|
| [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 | 🔧 | |
|
package/lib/index.d.ts
CHANGED
|
@@ -10,6 +10,16 @@ declare module 'eslint' {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
interface RuleOptions {
|
|
13
|
+
/**
|
|
14
|
+
* enforce consistent use of closing sequence in ATX headings.
|
|
15
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/atx-headings-closing-sequence.html
|
|
16
|
+
*/
|
|
17
|
+
'markdown-preferences/atx-headings-closing-sequence'?: Linter.RuleEntry<MarkdownPreferencesAtxHeadingsClosingSequence>;
|
|
18
|
+
/**
|
|
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-headings-closing-sequence-length.html
|
|
21
|
+
*/
|
|
22
|
+
'markdown-preferences/atx-headings-closing-sequence-length'?: Linter.RuleEntry<MarkdownPreferencesAtxHeadingsClosingSequenceLength>;
|
|
13
23
|
/**
|
|
14
24
|
* enforce canonical language names in code blocks
|
|
15
25
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/canonical-code-block-language.html
|
|
@@ -20,6 +30,11 @@ interface RuleOptions {
|
|
|
20
30
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/definitions-last.html
|
|
21
31
|
*/
|
|
22
32
|
'markdown-preferences/definitions-last'?: Linter.RuleEntry<[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Enforce consistent emoji notation style in Markdown files.
|
|
35
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/emoji-notation.html
|
|
36
|
+
*/
|
|
37
|
+
'markdown-preferences/emoji-notation'?: Linter.RuleEntry<MarkdownPreferencesEmojiNotation>;
|
|
23
38
|
/**
|
|
24
39
|
* enforce consistent hard linebreak style.
|
|
25
40
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/hard-linebreak-style.html
|
|
@@ -50,6 +65,16 @@ interface RuleOptions {
|
|
|
50
65
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-trailing-spaces.html
|
|
51
66
|
*/
|
|
52
67
|
'markdown-preferences/no-trailing-spaces'?: Linter.RuleEntry<MarkdownPreferencesNoTrailingSpaces>;
|
|
68
|
+
/**
|
|
69
|
+
* enforce that ordered list markers use sequential numbers
|
|
70
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-sequence.html
|
|
71
|
+
*/
|
|
72
|
+
'markdown-preferences/ordered-list-marker-sequence'?: Linter.RuleEntry<[]>;
|
|
73
|
+
/**
|
|
74
|
+
* enforce that ordered list markers start with 1 or 0
|
|
75
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-start.html
|
|
76
|
+
*/
|
|
77
|
+
'markdown-preferences/ordered-list-marker-start'?: Linter.RuleEntry<MarkdownPreferencesOrderedListMarkerStart>;
|
|
53
78
|
/**
|
|
54
79
|
* enforce the use of autolinks for URLs
|
|
55
80
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-autolinks.html
|
|
@@ -81,11 +106,23 @@ interface RuleOptions {
|
|
|
81
106
|
*/
|
|
82
107
|
'markdown-preferences/sort-definitions'?: Linter.RuleEntry<MarkdownPreferencesSortDefinitions>;
|
|
83
108
|
}
|
|
109
|
+
type MarkdownPreferencesAtxHeadingsClosingSequence = [] | [{
|
|
110
|
+
closingSequence?: ("always" | "never");
|
|
111
|
+
}];
|
|
112
|
+
type MarkdownPreferencesAtxHeadingsClosingSequenceLength = [] | [{
|
|
113
|
+
mode?: ("match-opening" | "length" | "consistent" | "consistent-line-length" | "fixed-line-length");
|
|
114
|
+
length?: number;
|
|
115
|
+
}];
|
|
84
116
|
type MarkdownPreferencesCanonicalCodeBlockLanguage = [] | [{
|
|
85
117
|
languages?: {
|
|
86
118
|
[k: string]: string;
|
|
87
119
|
};
|
|
88
120
|
}];
|
|
121
|
+
type MarkdownPreferencesEmojiNotation = [] | [{
|
|
122
|
+
prefer?: ("unicode" | "colon");
|
|
123
|
+
ignoreUnknown?: boolean;
|
|
124
|
+
ignoreList?: string[];
|
|
125
|
+
}];
|
|
89
126
|
type MarkdownPreferencesHardLinebreakStyle = [] | [{
|
|
90
127
|
style?: ("backslash" | "spaces");
|
|
91
128
|
}];
|
|
@@ -104,6 +141,9 @@ type MarkdownPreferencesNoTrailingSpaces = [] | [{
|
|
|
104
141
|
skipBlankLines?: boolean;
|
|
105
142
|
ignoreComments?: boolean;
|
|
106
143
|
}];
|
|
144
|
+
type MarkdownPreferencesOrderedListMarkerStart = [] | [{
|
|
145
|
+
start?: (1 | 0);
|
|
146
|
+
}];
|
|
107
147
|
type MarkdownPreferencesPreferInlineCodeWords = [] | [{
|
|
108
148
|
words: string[];
|
|
109
149
|
ignores?: {
|
|
@@ -156,7 +196,7 @@ declare namespace meta_d_exports {
|
|
|
156
196
|
export { name, version };
|
|
157
197
|
}
|
|
158
198
|
declare const name: "eslint-plugin-markdown-preferences";
|
|
159
|
-
declare const version: "0.
|
|
199
|
+
declare const version: "0.13.0";
|
|
160
200
|
//#endregion
|
|
161
201
|
//#region src/index.d.ts
|
|
162
202
|
declare const configs: {
|