eslint-plugin-md-style 0.2.0 → 0.3.1

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
@@ -120,9 +120,12 @@ export default antfu(
120
120
 
121
121
  | Rule | Included in `recommended` | Autofix |
122
122
  | --- | --- | --- |
123
+ | `md-style/padding-around-custom-container` | ✅ | 🔧 |
124
+ | `md-style/space-around-custom-container` | | 🔧 |
123
125
  | `md-style/space-around-inline-element` | ✅ | 🔧 |
124
126
  | `md-style/space-around-number` | | 🔧 |
125
127
  | `md-style/space-around-word` | | 🔧 |
128
+ | `md-style/valid-custom-container-type` | ✅ | 🔧 |
126
129
  | `md-style/valid-heading-anchor` | ✅ | 🔧 |
127
130
 
128
131
  ## Why `@eslint/markdown` Is Required
package/dist/index.d.mts CHANGED
@@ -1,6 +1,48 @@
1
+ import "@eslint/markdown";
1
2
  import { ESLint, Linter } from "eslint";
2
-
3
- //#region src/index.d.ts
3
+ //#region types/typegen.d.ts
4
+ interface RuleOptions {
5
+ /**
6
+ * Enforce padding around VitePress custom containers.
7
+ * @see https://github.com/NoiseFan/eslint-plugin-md-style/blob/main/docs/rules/en/padding-around-custom-container.md
8
+ */
9
+ 'md-style/padding-around-custom-container'?: Linter.RuleEntry<MdStylePaddingAroundCustomContainer>;
10
+ /**
11
+ * Enforce spacing around VitePress custom-container markers.
12
+ * @see https://github.com/NoiseFan/eslint-plugin-md-style/blob/main/docs/rules/en/space-around-custom-container.md
13
+ */
14
+ 'md-style/space-around-custom-container'?: Linter.RuleEntry<[]>;
15
+ /**
16
+ * Enforce spacing around Markdown inline elements.
17
+ * @see https://github.com/NoiseFan/eslint-plugin-md-style/blob/main/docs/rules/en/space-around-inline-element.md
18
+ */
19
+ 'md-style/space-around-inline-element'?: Linter.RuleEntry<[]>;
20
+ /**
21
+ * Enforce a single space between CJK characters and numbers.
22
+ * @see https://github.com/NoiseFan/eslint-plugin-md-style/blob/main/docs/rules/en/space-around-number.md
23
+ */
24
+ 'md-style/space-around-number'?: Linter.RuleEntry<[]>;
25
+ /**
26
+ * Enforce a single space between CJK characters and Latin words.
27
+ * @see https://github.com/NoiseFan/eslint-plugin-md-style/blob/main/docs/rules/en/space-around-word.md
28
+ */
29
+ 'md-style/space-around-word'?: Linter.RuleEntry<[]>;
30
+ /**
31
+ * Require custom containers to use a supported type.
32
+ * @see https://github.com/NoiseFan/eslint-plugin-md-style/blob/main/docs/rules/en/valid-custom-container-type.md
33
+ */
34
+ 'md-style/valid-custom-container-type'?: Linter.RuleEntry<[]>;
35
+ /**
36
+ * Require strict lowercase anchors for headings that contain CJK text.
37
+ * @see https://github.com/NoiseFan/eslint-plugin-md-style/blob/main/docs/rules/en/valid-heading-anchor.md
38
+ */
39
+ 'md-style/valid-heading-anchor'?: Linter.RuleEntry<[]>;
40
+ }
41
+ /* ======= Declarations ======= */
42
+ // ----- md-style/padding-around-custom-container -----
43
+ type MdStylePaddingAroundCustomContainer = [] | [("compact" | "loose")];
44
+ //#endregion
45
+ //#region index.d.ts
4
46
  declare const plugin: ESLint.Plugin;
5
47
  interface PluginConfigMap {
6
48
  recommended: Linter.Config;
@@ -12,4 +54,4 @@ type MdStylePlugin = ESLint.Plugin & {
12
54
  };
13
55
  declare const mdStylePlugin: MdStylePlugin;
14
56
  //#endregion
15
- export { MdStylePlugin, configs, mdStylePlugin as default, plugin };
57
+ export { MdStylePlugin, type RuleOptions, configs, mdStylePlugin as default, plugin };