eslint-plugin-markdown-preferences 0.12.0 → 0.14.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 CHANGED
@@ -29,7 +29,7 @@ For detailed usage instructions, rule configurations, and examples, visit our co
29
29
  ## 💿 Installation
30
30
 
31
31
  ```sh
32
- npm install --save-dev eslint eslint-plugin-markdown-preferences
32
+ npm install --save-dev eslint @eslint/markdown eslint-plugin-markdown-preferences
33
33
  ```
34
34
 
35
35
  <!--DOCS_IGNORE_END-->
@@ -90,23 +90,31 @@ The rules with the following star ⭐ are included in the configs.
90
90
 
91
91
  ### Preference Rules
92
92
 
93
+ - Rules to unify the expression and description style of documents.
94
+
93
95
  | Rule ID | Description | Fixable | RECOMMENDED |
94
96
  |:--------|:------------|:-------:|:-----------:|
95
97
  | [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 | 🔧 | |
98
+ | [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. | 🔧 | |
96
99
  | [markdown-preferences/heading-casing](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/heading-casing.html) | enforce consistent casing in headings. | 🔧 | |
97
- | [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. | | ⭐ |
98
100
  | [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 | 🔧 | |
99
101
  | [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. | 🔧 | |
100
102
  | [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. | 🔧 | |
103
+ | [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. | 🔧 | |
101
104
 
102
105
  ### Stylistic Rules
103
106
 
107
+ - Rules related to the formatting and visual style of Markdown.
108
+
104
109
  | Rule ID | Description | Fixable | RECOMMENDED |
105
110
  |:--------|:------------|:-------:|:-----------:|
111
+ | [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. | 🔧 | |
112
+ | [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. | 🔧 | |
106
113
  | [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 | 🔧 | |
107
114
  | [markdown-preferences/hard-linebreak-style](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/hard-linebreak-style.html) | enforce consistent hard linebreak style. | 🔧 | ⭐ |
108
115
  | [markdown-preferences/no-laziness-blockquotes](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-laziness-blockquotes.html) | disallow laziness in blockquotes | | ⭐ |
109
116
  | [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. | 🔧 | |
117
+ | [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. | | ⭐ |
110
118
  | [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. | 🔧 | |
111
119
  | [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 | 🔧 | |
112
120
  | [markdown-preferences/prefer-autolinks](https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-autolinks.html) | enforce the use of autolinks for URLs | 🔧 | ⭐ |
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
@@ -90,12 +105,29 @@ interface RuleOptions {
90
105
  * @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/sort-definitions.html
91
106
  */
92
107
  'markdown-preferences/sort-definitions'?: Linter.RuleEntry<MarkdownPreferencesSortDefinitions>;
108
+ /**
109
+ * enforce consistent casing in table header cells.
110
+ * @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/table-header-casing.html
111
+ */
112
+ 'markdown-preferences/table-header-casing'?: Linter.RuleEntry<MarkdownPreferencesTableHeaderCasing>;
93
113
  }
114
+ type MarkdownPreferencesAtxHeadingsClosingSequence = [] | [{
115
+ closingSequence?: ("always" | "never");
116
+ }];
117
+ type MarkdownPreferencesAtxHeadingsClosingSequenceLength = [] | [{
118
+ mode?: ("match-opening" | "length" | "consistent" | "consistent-line-length" | "fixed-line-length");
119
+ length?: number;
120
+ }];
94
121
  type MarkdownPreferencesCanonicalCodeBlockLanguage = [] | [{
95
122
  languages?: {
96
123
  [k: string]: string;
97
124
  };
98
125
  }];
126
+ type MarkdownPreferencesEmojiNotation = [] | [{
127
+ prefer?: ("unicode" | "colon");
128
+ ignoreUnknown?: boolean;
129
+ ignoreList?: string[];
130
+ }];
99
131
  type MarkdownPreferencesHardLinebreakStyle = [] | [{
100
132
  style?: ("backslash" | "spaces");
101
133
  }];
@@ -151,6 +183,12 @@ type MarkdownPreferencesSortDefinitions = [] | [{
151
183
  })[];
152
184
  alphabetical?: boolean;
153
185
  }];
186
+ type MarkdownPreferencesTableHeaderCasing = [] | [{
187
+ style?: ("Title Case" | "Sentence case");
188
+ preserveWords?: string[];
189
+ ignorePatterns?: string[];
190
+ minorWords?: string[];
191
+ }];
154
192
  declare namespace recommended_d_exports {
155
193
  export { files, language, languageOptions, name$1 as name, plugins, rules$1 as rules };
156
194
  }
@@ -169,7 +207,7 @@ declare namespace meta_d_exports {
169
207
  export { name, version };
170
208
  }
171
209
  declare const name: "eslint-plugin-markdown-preferences";
172
- declare const version: "0.12.0";
210
+ declare const version: "0.14.0";
173
211
  //#endregion
174
212
  //#region src/index.d.ts
175
213
  declare const configs: {