eslint-plugin-markdown-preferences 0.24.0 → 0.26.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 +88 -56
- package/lib/index.d.ts +46 -2
- package/lib/index.js +1295 -81
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,18 +13,24 @@ A specialized ESLint plugin that helps enforce consistent writing style and form
|
|
|
13
13
|
|
|
14
14
|
## 📛 Features
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
- 📝 **Comprehensive style enforcement**\
|
|
17
|
+
Unifies document expression and description style: heading casing, table header casing, inline code/link usage, emoji notation, and more.
|
|
18
|
+
- 🧩 **Notation and formatting consistency**\
|
|
19
|
+
Standardizes Markdown notation: list markers, code fences, link/reference style, thematic breaks, and table formatting.
|
|
20
|
+
- 🎨 **Whitespace and decorative rules**\
|
|
21
|
+
Controls indentation, spacing, line breaks, trailing spaces, and decorative elements for clean, readable Markdown.
|
|
22
|
+
- 🔧 **Auto-fix support**\
|
|
23
|
+
Most rules support ESLint's `--fix` option for effortless formatting and correction.
|
|
24
|
+
- ⚙️ **Flexible configuration**\
|
|
25
|
+
Provides both "recommended" and "standard" configs, and allows you to finely customize formatting and rules to suit your preferences and Markdown style.
|
|
26
|
+
- 🌐 **Live demo & documentation**\
|
|
27
|
+
Try it instantly in the [Online Demo](https://eslint-online-playground.netlify.app/#eslint-plugin-markdown-preferences) and see [full documentation][documentation site].
|
|
22
28
|
|
|
23
29
|
<!--DOCS_IGNORE_START-->
|
|
24
30
|
|
|
25
31
|
## 📖 Documentation
|
|
26
32
|
|
|
27
|
-
For detailed usage instructions, rule configurations, and examples, visit our comprehensive [documentation site]
|
|
33
|
+
For detailed usage instructions, rule configurations, and examples, visit our comprehensive [documentation site].
|
|
28
34
|
|
|
29
35
|
## 💿 Installation
|
|
30
36
|
|
|
@@ -96,62 +102,87 @@ The rules with the following 💄 are included in the `standard` config.
|
|
|
96
102
|
|
|
97
103
|
<!-- prettier-ignore-start -->
|
|
98
104
|
|
|
99
|
-
| Rule ID
|
|
100
|
-
|
|
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
|
|
102
|
-
| [markdown-preferences/emoji-notation](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/emoji-notation.html)
|
|
103
|
-
| [markdown-preferences/heading-casing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/heading-casing.html)
|
|
104
|
-
| [markdown-preferences/ordered-list-marker-start](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-start.html)
|
|
105
|
-
| [markdown-preferences/prefer-inline-code-words](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-inline-code-words.html)
|
|
106
|
-
| [markdown-preferences/prefer-linked-words](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-linked-words.html)
|
|
107
|
-
| [markdown-preferences/table-header-casing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-header-casing.html)
|
|
105
|
+
| Rule ID | Description | Fixable | Config |
|
|
106
|
+
| :------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------- | :-----: | :----: |
|
|
107
|
+
| [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 | 🔧 | |
|
|
108
|
+
| [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. | 🔧 | |
|
|
109
|
+
| [markdown-preferences/heading-casing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/heading-casing.html) | enforce consistent casing in headings. | 🔧 | |
|
|
110
|
+
| [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 | 🔧 | 💄 |
|
|
111
|
+
| [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. | 🔧 | |
|
|
112
|
+
| [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. | 🔧 | |
|
|
113
|
+
| [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. | 🔧 | |
|
|
114
|
+
|
|
115
|
+
<!-- prettier-ignore-end -->
|
|
116
|
+
|
|
117
|
+
### Notation Rules
|
|
118
|
+
|
|
119
|
+
- Rules related to notation styles in Markdown.
|
|
120
|
+
|
|
121
|
+
<!-- prettier-ignore-start -->
|
|
122
|
+
|
|
123
|
+
| Rule ID | Description | Fixable | Config |
|
|
124
|
+
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------- | :-----: | :----: |
|
|
125
|
+
| [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 | 🔧 | 💄 |
|
|
126
|
+
| [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. | 🔧 | 💄 |
|
|
127
|
+
| [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 | 🔧 | |
|
|
128
|
+
| [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 | 🔧 | 💄 |
|
|
129
|
+
| [markdown-preferences/hard-linebreak-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/hard-linebreak-style.html) | enforce consistent hard linebreak style. | 🔧 | ⭐💄 |
|
|
130
|
+
| [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 | 🔧 | 💄 |
|
|
131
|
+
| [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 | 🔧 | 💄 |
|
|
132
|
+
| [markdown-preferences/link-destination-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-destination-style.html) | enforce a consistent style for link destinations | 🔧 | 💄 |
|
|
133
|
+
| [markdown-preferences/link-title-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-title-style.html) | enforce a consistent style for link titles | 🔧 | 💄 |
|
|
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/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 | 🔧 | 💄 |
|
|
136
|
+
| [markdown-preferences/prefer-autolinks](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-autolinks.html) | enforce the use of autolinks for URLs | 🔧 | ⭐💄 |
|
|
137
|
+
| [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 | 🔧 | ⭐💄 |
|
|
138
|
+
| [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 | 🔧 | |
|
|
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
|
+
|
|
142
|
+
<!-- prettier-ignore-end -->
|
|
143
|
+
|
|
144
|
+
### Whitespace Rules
|
|
145
|
+
|
|
146
|
+
- Rules related to whitespace styles in Markdown.
|
|
147
|
+
|
|
148
|
+
<!-- prettier-ignore-start -->
|
|
149
|
+
|
|
150
|
+
| Rule ID | Description | Fixable | Config |
|
|
151
|
+
| :-------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------- | :-----: | :----: |
|
|
152
|
+
| [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 | 🔧 | ⭐💄 |
|
|
153
|
+
| [markdown-preferences/indent](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/indent.html) | enforce consistent indentation in Markdown files | 🔧 | 💄 |
|
|
154
|
+
| [markdown-preferences/link-bracket-newline](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-bracket-newline.html) | enforce linebreaks after opening and before closing link brackets | 🔧 | 💄 |
|
|
155
|
+
| [markdown-preferences/link-bracket-spacing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-bracket-spacing.html) | enforce consistent spacing inside link brackets | 🔧 | 💄 |
|
|
156
|
+
| [markdown-preferences/link-paren-newline](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-paren-newline.html) | enforce linebreaks after opening and before closing link parentheses | 🔧 | 💄 |
|
|
157
|
+
| [markdown-preferences/link-paren-spacing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-paren-spacing.html) | enforce consistent spacing inside link parentheses | 🔧 | 💄 |
|
|
158
|
+
| [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 | 🔧 | ⭐💄 |
|
|
159
|
+
| [markdown-preferences/no-multi-spaces](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-multi-spaces.html) | disallow multiple spaces | 🔧 | 💄 |
|
|
160
|
+
| [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. | 🔧 | 💄 |
|
|
161
|
+
| [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. | 🔧 | 💄 |
|
|
162
|
+
| [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 | 🔧 | 💄 |
|
|
163
|
+
| [markdown-preferences/table-pipe-spacing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-pipe-spacing.html) | enforce consistent spacing around table pipes | 🔧 | 💄 |
|
|
108
164
|
|
|
109
165
|
<!-- prettier-ignore-end -->
|
|
110
166
|
|
|
111
|
-
###
|
|
167
|
+
### Decorative Rules
|
|
112
168
|
|
|
113
|
-
- Rules related to
|
|
169
|
+
- Rules related to visual or stylistic decorations in Markdown.
|
|
114
170
|
|
|
115
171
|
<!-- prettier-ignore-start -->
|
|
116
172
|
|
|
117
|
-
| Rule ID
|
|
118
|
-
|
|
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)
|
|
121
|
-
| [markdown-preferences/
|
|
122
|
-
| [markdown-preferences/
|
|
123
|
-
| [markdown-preferences/
|
|
124
|
-
| [markdown-preferences/
|
|
125
|
-
| [markdown-preferences/definitions
|
|
126
|
-
| [markdown-preferences/
|
|
127
|
-
| [markdown-preferences/
|
|
128
|
-
| [markdown-preferences/
|
|
129
|
-
| [markdown-preferences/
|
|
130
|
-
| [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 | 🔧 | 💄 |
|
|
131
|
-
| [markdown-preferences/link-bracket-newline](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-bracket-newline.html) | enforce linebreaks after opening and before closing link brackets | 🔧 | 💄 |
|
|
132
|
-
| [markdown-preferences/link-bracket-spacing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-bracket-spacing.html) | enforce consistent spacing inside link brackets | 🔧 | 💄 |
|
|
133
|
-
| [markdown-preferences/link-destination-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-destination-style.html) | enforce a consistent style for link destinations | 🔧 | 💄 |
|
|
134
|
-
| [markdown-preferences/link-paren-newline](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-paren-newline.html) | enforce linebreaks after opening and before closing link parentheses | 🔧 | 💄 |
|
|
135
|
-
| [markdown-preferences/link-paren-spacing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-paren-spacing.html) | enforce consistent spacing inside link parentheses | 🔧 | 💄 |
|
|
136
|
-
| [markdown-preferences/link-title-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/link-title-style.html) | enforce a consistent style for link titles | 🔧 | 💄 |
|
|
137
|
-
| [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 | 🔧 | ⭐💄 |
|
|
138
|
-
| [markdown-preferences/no-laziness-blockquotes](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-laziness-blockquotes.html) | disallow laziness in blockquotes | | ⭐💄 |
|
|
139
|
-
| [markdown-preferences/no-multi-spaces](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-multi-spaces.html) | disallow multiple spaces | 🔧 | 💄 |
|
|
140
|
-
| [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. | 🔧 | 💄 |
|
|
141
|
-
| [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. | | ⭐💄 |
|
|
142
|
-
| [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. | 🔧 | 💄 |
|
|
143
|
-
| [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 | 🔧 | 💄 |
|
|
144
|
-
| [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 | 🔧 | 💄 |
|
|
145
|
-
| [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 | 🔧 | 💄 |
|
|
146
|
-
| [markdown-preferences/prefer-autolinks](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-autolinks.html) | enforce the use of autolinks for URLs | 🔧 | ⭐💄 |
|
|
147
|
-
| [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 | 🔧 | ⭐💄 |
|
|
148
|
-
| [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 | 🔧 | |
|
|
149
|
-
| [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 | 🔧 | 💄 |
|
|
150
|
-
| [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 | 🔧 | 💄 |
|
|
151
|
-
| [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 | 🔧 | 💄 |
|
|
152
|
-
| [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. | 🔧 | 💄 |
|
|
153
|
-
| [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. | 🔧 | 💄 |
|
|
154
|
-
| [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. | 🔧 | 💄 |
|
|
173
|
+
| Rule ID | Description | Fixable | Config |
|
|
174
|
+
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------- | :-----: | :----: |
|
|
175
|
+
| [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. | 🔧 | 💄 |
|
|
176
|
+
| [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. | 🔧 | 💄 |
|
|
177
|
+
| [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. | 🔧 | 💄 |
|
|
178
|
+
| [markdown-preferences/no-laziness-blockquotes](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-laziness-blockquotes.html) | disallow laziness in blockquotes | | ⭐💄 |
|
|
179
|
+
| [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 | 🔧 | 💄 |
|
|
180
|
+
| [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 | 🔧 | 💄 |
|
|
181
|
+
| [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 | 🔧 | 💄 |
|
|
182
|
+
| [markdown-preferences/table-leading-trailing-pipes](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-leading-trailing-pipes.html) | enforce consistent use of leading and trailing pipes in tables. | 🔧 | 💄 |
|
|
183
|
+
| [markdown-preferences/table-pipe-alignment](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-pipe-alignment.html) | enforce consistent alignment of table pipes | 🔧 | 💄 |
|
|
184
|
+
| [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. | 🔧 | 💄 |
|
|
185
|
+
| [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. | 🔧 | 💄 |
|
|
155
186
|
|
|
156
187
|
<!-- prettier-ignore-end -->
|
|
157
188
|
|
|
@@ -180,5 +211,6 @@ Please use GitHub's Issues/PRs.
|
|
|
180
211
|
|
|
181
212
|
See the [LICENSE](./LICENSE) file for license rights and limitations (MIT).
|
|
182
213
|
|
|
214
|
+
[documentation site]: https://ota-meshi.github.io/eslint-plugin-markdown-preferences/
|
|
183
215
|
[npm-package]: https://www.npmjs.com/package/eslint-plugin-markdown-preferences
|
|
184
216
|
[npmtrends]: http://www.npmtrends.com/eslint-plugin-markdown-preferences
|
package/lib/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ interface RuleOptions {
|
|
|
49
49
|
* require link definitions and footnote definitions to be placed at the end of the document
|
|
50
50
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/definitions-last.html
|
|
51
51
|
*/
|
|
52
|
-
'markdown-preferences/definitions-last'?: Linter.RuleEntry<
|
|
52
|
+
'markdown-preferences/definitions-last'?: Linter.RuleEntry<MarkdownPreferencesDefinitionsLast>;
|
|
53
53
|
/**
|
|
54
54
|
* enforce consistent emoji notation style in Markdown files.
|
|
55
55
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/emoji-notation.html
|
|
@@ -210,6 +210,21 @@ interface RuleOptions {
|
|
|
210
210
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-header-casing.html
|
|
211
211
|
*/
|
|
212
212
|
'markdown-preferences/table-header-casing'?: Linter.RuleEntry<MarkdownPreferencesTableHeaderCasing>;
|
|
213
|
+
/**
|
|
214
|
+
* enforce consistent use of leading and trailing pipes in tables.
|
|
215
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-leading-trailing-pipes.html
|
|
216
|
+
*/
|
|
217
|
+
'markdown-preferences/table-leading-trailing-pipes'?: Linter.RuleEntry<MarkdownPreferencesTableLeadingTrailingPipes>;
|
|
218
|
+
/**
|
|
219
|
+
* enforce consistent alignment of table pipes
|
|
220
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-pipe-alignment.html
|
|
221
|
+
*/
|
|
222
|
+
'markdown-preferences/table-pipe-alignment'?: Linter.RuleEntry<MarkdownPreferencesTablePipeAlignment>;
|
|
223
|
+
/**
|
|
224
|
+
* enforce consistent spacing around table pipes
|
|
225
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-pipe-spacing.html
|
|
226
|
+
*/
|
|
227
|
+
'markdown-preferences/table-pipe-spacing'?: Linter.RuleEntry<MarkdownPreferencesTablePipeSpacing>;
|
|
213
228
|
/**
|
|
214
229
|
* enforce consistent character style for thematic breaks (horizontal rules) in Markdown.
|
|
215
230
|
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/thematic-break-character-style.html
|
|
@@ -260,6 +275,16 @@ type MarkdownPreferencesCodeFenceLength = [] | [{
|
|
|
260
275
|
type MarkdownPreferencesCodeFenceStyle = [] | [{
|
|
261
276
|
style?: ("backtick" | "tilde");
|
|
262
277
|
}];
|
|
278
|
+
type MarkdownPreferencesDefinitionsLast = [] | [{
|
|
279
|
+
linkDefinitionPlacement?: {
|
|
280
|
+
referencedFromSingleSection?: ("document-last" | "section-last");
|
|
281
|
+
referencedFromMultipleSections?: ("document-last" | "first-reference-section-last" | "last-reference-section-last");
|
|
282
|
+
};
|
|
283
|
+
footnoteDefinitionPlacement?: {
|
|
284
|
+
referencedFromSingleSection?: ("document-last" | "section-last");
|
|
285
|
+
referencedFromMultipleSections?: ("document-last" | "first-reference-section-last" | "last-reference-section-last");
|
|
286
|
+
};
|
|
287
|
+
}];
|
|
263
288
|
type MarkdownPreferencesEmojiNotation = [] | [{
|
|
264
289
|
prefer?: ("unicode" | "colon");
|
|
265
290
|
ignoreUnknown?: boolean;
|
|
@@ -413,6 +438,25 @@ type MarkdownPreferencesTableHeaderCasing = [] | [{
|
|
|
413
438
|
ignorePatterns?: string[];
|
|
414
439
|
minorWords?: string[];
|
|
415
440
|
}];
|
|
441
|
+
type MarkdownPreferencesTableLeadingTrailingPipes = [] | [(("always" | "never") | {
|
|
442
|
+
leading?: ("always" | "never");
|
|
443
|
+
trailing?: ("always" | "never");
|
|
444
|
+
})];
|
|
445
|
+
type MarkdownPreferencesTablePipeAlignment = [] | [{
|
|
446
|
+
column?: ("minimum" | "consistent");
|
|
447
|
+
}];
|
|
448
|
+
type MarkdownPreferencesTablePipeSpacing = [] | [{
|
|
449
|
+
space?: (("always" | "never") | {
|
|
450
|
+
leading?: ("always" | "never");
|
|
451
|
+
trailing?: ("always" | "never");
|
|
452
|
+
});
|
|
453
|
+
cellAlign?: (("left" | "center" | "right") | {
|
|
454
|
+
defaultDelimiter?: ("left" | "center" | "right" | "ignore");
|
|
455
|
+
leftAlignmentDelimiter?: ("left" | "center" | "right" | "ignore");
|
|
456
|
+
centerAlignmentDelimiter?: ("left" | "center" | "right" | "ignore");
|
|
457
|
+
rightAlignmentDelimiter?: ("left" | "center" | "right" | "ignore");
|
|
458
|
+
});
|
|
459
|
+
}];
|
|
416
460
|
type MarkdownPreferencesThematicBreakCharacterStyle = [] | [{
|
|
417
461
|
style?: ("-" | "*" | "_");
|
|
418
462
|
}];
|
|
@@ -454,7 +498,7 @@ declare namespace meta_d_exports {
|
|
|
454
498
|
export { name, version };
|
|
455
499
|
}
|
|
456
500
|
declare const name: "eslint-plugin-markdown-preferences";
|
|
457
|
-
declare const version: "0.
|
|
501
|
+
declare const version: "0.26.0";
|
|
458
502
|
//#endregion
|
|
459
503
|
//#region src/index.d.ts
|
|
460
504
|
declare const configs: {
|