eslint-markdown 0.15.0 → 0.17.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 +9 -9
- package/build/configs/all.d.ts +2 -0
- package/build/configs/all.js +2 -0
- package/build/configs/stylistic.d.ts +1 -0
- package/build/configs/stylistic.js +1 -0
- package/build/core/types.d.ts +4 -0
- package/build/core/utils/escape-string-regexp.d.ts +2 -2
- package/build/core/utils/escape-string-regexp.js +2 -2
- package/build/core/utils/get-code-style.d.ts +13 -0
- package/build/core/utils/get-code-style.js +25 -0
- package/build/core/utils/html.d.ts +1 -1
- package/build/core/utils/html.js +1 -1
- package/build/core/utils/index.d.ts +7 -7
- package/build/core/utils/index.js +7 -7
- package/build/core/utils/is-blank-line.d.ts +1 -1
- package/build/core/utils/is-blank-line.js +1 -1
- package/build/core/utils/normalize-regex-pattern.d.ts +1 -1
- package/build/core/utils/normalize-regex-pattern.js +1 -1
- package/build/core/utils/skip-ranges.d.ts +2 -4
- package/build/core/utils/skip-ranges.js +1 -1
- package/build/core/utils/test-regex-stateless.d.ts +1 -1
- package/build/core/utils/test-regex-stateless.js +1 -1
- package/build/rules/consistent-code-style.d.ts +1 -2
- package/build/rules/consistent-code-style.js +2 -22
- package/build/rules/consistent-heading-style.d.ts +55 -0
- package/build/rules/consistent-heading-style.js +290 -0
- package/build/rules/index.d.ts +122 -2
- package/build/rules/index.js +4 -0
- package/build/rules/no-git-conflict-marker.d.ts +1 -1
- package/build/rules/no-irregular-dash.d.ts +36 -0
- package/build/rules/no-irregular-dash.js +50 -2
- package/build/rules/no-irregular-whitespace.d.ts +20 -0
- package/build/rules/no-irregular-whitespace.js +17 -1
- package/build/rules/no-shell-dollar.d.ts +57 -0
- package/build/rules/no-shell-dollar.js +110 -0
- package/build/rules/no-url-trailing-slash.js +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# eslint-markdown
|
|
2
2
|
|
|
3
|
-
[](https://github.com/eslint-markdown/eslint-markdown/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/eslint-markdown/eslint-markdown/actions/workflows/test.yml)
|
|
5
|
+
[](https://codecov.io/gh/eslint-markdown/eslint-markdown)
|
|
6
6
|

|
|
7
7
|
|
|
8
8
|
[](https://www.npmjs.com/package/eslint-markdown)
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
> [!IMPORTANT]
|
|
13
13
|
>
|
|
14
|
-
> If you like this package, please give it a star on [GitHub](https://github.com/
|
|
14
|
+
> If you like this package, please give it a star on [GitHub](https://github.com/eslint-markdown/eslint-markdown)!⭐<br/>
|
|
15
15
|
> Your support helps us improve and maintain the project.
|
|
16
16
|
|
|
17
17
|
Lint your Markdown with ESLint. Additional rules for use with `@eslint/markdown`.🛠️
|
|
@@ -27,17 +27,17 @@ For full documentation, see the [official documentation of the `eslint-markdown`
|
|
|
27
27
|
|
|
28
28
|
## Compatibility
|
|
29
29
|
|
|
30
|
-
This [`eslint-markdown`](https://github.com/
|
|
30
|
+
This [`eslint-markdown`](https://github.com/eslint-markdown/eslint-markdown#readme) plugin does not include any rules that overlap with ESLint's built-in Markdown rules provided by [`@eslint/markdown`](https://github.com/eslint/markdown#readme).
|
|
31
31
|
|
|
32
32
|
So, we **highly recommend** using the `eslint-markdown` plugin alongside ESLint's built-in Markdown support, `@eslint/markdown`.
|
|
33
33
|
|
|
34
34
|
## Code of Conduct
|
|
35
35
|
|
|
36
|
-
See [Code of Conduct](https://github.com/
|
|
36
|
+
See [Code of Conduct](https://github.com/eslint-markdown/eslint-markdown/blob/main/CODE_OF_CONDUCT.md).
|
|
37
37
|
|
|
38
38
|
## Change Log
|
|
39
39
|
|
|
40
|
-
See [Change Log](https://github.com/
|
|
40
|
+
See [Change Log](https://github.com/eslint-markdown/eslint-markdown/blob/main/CHANGELOG.md).
|
|
41
41
|
|
|
42
42
|
## Versioning
|
|
43
43
|
|
|
@@ -45,8 +45,8 @@ See [Versioning](https://eslint-markdown.lumir.page/docs/get-started/versioning)
|
|
|
45
45
|
|
|
46
46
|
## Security
|
|
47
47
|
|
|
48
|
-
See [Security](https://github.com/
|
|
48
|
+
See [Security](https://github.com/eslint-markdown/eslint-markdown/blob/main/SECURITY.md).
|
|
49
49
|
|
|
50
50
|
## License
|
|
51
51
|
|
|
52
|
-
[MIT](https://github.com/
|
|
52
|
+
[MIT](https://github.com/eslint-markdown/eslint-markdown/blob/main/LICENSE.md)
|
package/build/configs/all.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export default function all(plugin: ESLint.Plugin): {
|
|
|
23
23
|
readonly 'md/consistent-code-style': "error";
|
|
24
24
|
readonly 'md/consistent-delete-style': "error";
|
|
25
25
|
readonly 'md/consistent-emphasis-style': "error";
|
|
26
|
+
readonly 'md/consistent-heading-style': "error";
|
|
26
27
|
readonly 'md/consistent-inline-code-style': "error";
|
|
27
28
|
readonly 'md/consistent-strong-style': "error";
|
|
28
29
|
readonly 'md/consistent-thematic-break-style': "error";
|
|
@@ -36,6 +37,7 @@ export default function all(plugin: ESLint.Plugin): {
|
|
|
36
37
|
readonly 'md/no-git-conflict-marker': "error";
|
|
37
38
|
readonly 'md/no-irregular-dash': "error";
|
|
38
39
|
readonly 'md/no-irregular-whitespace': "error";
|
|
40
|
+
readonly 'md/no-shell-dollar': "error";
|
|
39
41
|
readonly 'md/no-tab': "error";
|
|
40
42
|
readonly 'md/no-trailing-heading-punctuation': "error";
|
|
41
43
|
readonly 'md/no-url-trailing-slash': "error";
|
package/build/configs/all.js
CHANGED
|
@@ -31,6 +31,7 @@ export default function all(plugin) {
|
|
|
31
31
|
'md/consistent-code-style': 'error',
|
|
32
32
|
'md/consistent-delete-style': 'error',
|
|
33
33
|
'md/consistent-emphasis-style': 'error',
|
|
34
|
+
'md/consistent-heading-style': 'error',
|
|
34
35
|
'md/consistent-inline-code-style': 'error',
|
|
35
36
|
'md/consistent-strong-style': 'error',
|
|
36
37
|
'md/consistent-thematic-break-style': 'error',
|
|
@@ -44,6 +45,7 @@ export default function all(plugin) {
|
|
|
44
45
|
'md/no-git-conflict-marker': 'error',
|
|
45
46
|
'md/no-irregular-dash': 'error',
|
|
46
47
|
'md/no-irregular-whitespace': 'error',
|
|
48
|
+
'md/no-shell-dollar': 'error',
|
|
47
49
|
'md/no-tab': 'error',
|
|
48
50
|
'md/no-trailing-heading-punctuation': 'error',
|
|
49
51
|
'md/no-url-trailing-slash': 'error',
|
|
@@ -19,6 +19,7 @@ export default function stylistic(plugin: ESLint.Plugin): {
|
|
|
19
19
|
readonly 'md/consistent-code-style': "error";
|
|
20
20
|
readonly 'md/consistent-delete-style': "error";
|
|
21
21
|
readonly 'md/consistent-emphasis-style': "error";
|
|
22
|
+
readonly 'md/consistent-heading-style': "error";
|
|
22
23
|
readonly 'md/consistent-inline-code-style': "error";
|
|
23
24
|
readonly 'md/consistent-strong-style': "error";
|
|
24
25
|
readonly 'md/consistent-thematic-break-style': "error";
|
|
@@ -27,6 +27,7 @@ export default function stylistic(plugin) {
|
|
|
27
27
|
'md/consistent-code-style': 'error',
|
|
28
28
|
'md/consistent-delete-style': 'error',
|
|
29
29
|
'md/consistent-emphasis-style': 'error',
|
|
30
|
+
'md/consistent-heading-style': 'error',
|
|
30
31
|
'md/consistent-inline-code-style': 'error',
|
|
31
32
|
'md/consistent-strong-style': 'error',
|
|
32
33
|
'md/consistent-thematic-break-style': 'error',
|
package/build/core/types.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @returns An escaped string.
|
|
12
12
|
* @example
|
|
13
13
|
* ```js
|
|
14
|
-
* import escapeStringRegexp from 'path/to/escape-string-regexp.js';
|
|
14
|
+
* import { escapeStringRegexp } from 'path/to/escape-string-regexp.js';
|
|
15
15
|
*
|
|
16
16
|
* const escapedString = escapeStringRegexp('How much $ for a 🦄?');
|
|
17
17
|
* //=> 'How much \\$ for a 🦄\\?'
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
* new RegExp(escapedString);
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
export
|
|
22
|
+
export declare function escapeStringRegexp(string: string): string;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* @returns An escaped string.
|
|
38
38
|
* @example
|
|
39
39
|
* ```js
|
|
40
|
-
* import escapeStringRegexp from 'path/to/escape-string-regexp.js';
|
|
40
|
+
* import { escapeStringRegexp } from 'path/to/escape-string-regexp.js';
|
|
41
41
|
*
|
|
42
42
|
* const escapedString = escapeStringRegexp('How much $ for a 🦄?');
|
|
43
43
|
* //=> 'How much \\$ for a 🦄\\?'
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* new RegExp(escapedString);
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
|
-
export
|
|
48
|
+
export function escapeStringRegexp(string) {
|
|
49
49
|
// Escape characters with special meaning either inside or outside character sets.
|
|
50
50
|
// Use a simple backslash escape when it's always valid, and a `\xnn` escape
|
|
51
51
|
// when the simpler form would be disallowed by Unicode patterns' stricter grammar.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Get the code style based on the given character.
|
|
3
|
+
* @see https://spec.commonmark.org/0.31.2/#fenced-code-blocks
|
|
4
|
+
* @see https://spec.commonmark.org/0.31.2/#indented-code-blocks
|
|
5
|
+
*/
|
|
6
|
+
export type CodeStyle = (typeof CODE_STYLE)[number];
|
|
7
|
+
export declare const CODE_STYLE: readonly ["indent", "fence-backtick", "fence-tilde"];
|
|
8
|
+
/**
|
|
9
|
+
* Get the code style based on the given character.
|
|
10
|
+
* @param char The character to determine the code style from. It must be a single character.
|
|
11
|
+
* @returns The code style.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getCodeStyle(char: string): CodeStyle;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Get the code style based on the given character.
|
|
3
|
+
* @see https://spec.commonmark.org/0.31.2/#fenced-code-blocks
|
|
4
|
+
* @see https://spec.commonmark.org/0.31.2/#indented-code-blocks
|
|
5
|
+
*/
|
|
6
|
+
// --------------------------------------------------------------------------------
|
|
7
|
+
// Export
|
|
8
|
+
// --------------------------------------------------------------------------------
|
|
9
|
+
export const CODE_STYLE = ['indent', 'fence-backtick', 'fence-tilde'];
|
|
10
|
+
/**
|
|
11
|
+
* Get the code style based on the given character.
|
|
12
|
+
* @param char The character to determine the code style from. It must be a single character.
|
|
13
|
+
* @returns The code style.
|
|
14
|
+
*/
|
|
15
|
+
export function getCodeStyle(char) {
|
|
16
|
+
if (char === '`') {
|
|
17
|
+
return 'fence-backtick';
|
|
18
|
+
}
|
|
19
|
+
else if (char === '~') {
|
|
20
|
+
return 'fence-tilde';
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
return 'indent';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -8,4 +8,4 @@ import type { DefaultTreeAdapterTypes } from 'parse5';
|
|
|
8
8
|
* @param tagName The tag name to search for (case-insensitive).
|
|
9
9
|
* @returns Matched elements.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export declare function getElementsByTagName(html: string, tagName: string): (DefaultTreeAdapterTypes.Element | DefaultTreeAdapterTypes.Template)[];
|
package/build/core/utils/html.js
CHANGED
|
@@ -14,7 +14,7 @@ import { parseFragment } from 'parse5';
|
|
|
14
14
|
* @param tagName The tag name to search for (case-insensitive).
|
|
15
15
|
* @returns Matched elements.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export function getElementsByTagName(html, tagName) {
|
|
18
18
|
const ast = parseFragment(html, { sourceCodeLocationInfo: true });
|
|
19
19
|
const normalizedTagName = tagName.toLowerCase();
|
|
20
20
|
const nodes = [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
1
|
+
export * from './escape-string-regexp.js';
|
|
2
|
+
export * from './get-code-style.js';
|
|
3
|
+
export * from './html.js';
|
|
4
|
+
export * from './is-blank-line.js';
|
|
5
|
+
export * from './normalize-regex-pattern.js';
|
|
6
|
+
export * from './skip-ranges.js';
|
|
7
|
+
export * from './test-regex-stateless.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
1
|
+
export * from './escape-string-regexp.js';
|
|
2
|
+
export * from './get-code-style.js';
|
|
3
|
+
export * from './html.js';
|
|
4
|
+
export * from './is-blank-line.js';
|
|
5
|
+
export * from './normalize-regex-pattern.js';
|
|
6
|
+
export * from './skip-ranges.js';
|
|
7
|
+
export * from './test-regex-stateless.js';
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
* @param blockquoteDepth The depth of blockquotes. Default is `-1`.
|
|
10
10
|
* @returns `true` if the line is blank. `false` otherwise.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export declare function isBlankLine(str: string, blockquoteDepth?: number): boolean;
|
|
@@ -17,7 +17,7 @@ const blockquoteChar = '>';
|
|
|
17
17
|
* @param blockquoteDepth The depth of blockquotes. Default is `-1`.
|
|
18
18
|
* @returns `true` if the line is blank. `false` otherwise.
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export function isBlankLine(str, blockquoteDepth = -1) {
|
|
21
21
|
// `.length` is cached for performance.
|
|
22
22
|
const strLength = str.length;
|
|
23
23
|
let remainingBlockquotes = blockquoteDepth + 1;
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
* @param pattern `RegExp` or string pattern to normalize.
|
|
12
12
|
* @returns The normalized `RegExp`.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export function normalizeRegexPattern(pattern) {
|
|
15
15
|
return typeof pattern === 'string' ? new RegExp(pattern, 'u') : pattern;
|
|
16
16
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Class to manage skip ranges.
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
5
|
-
type SourceRange = AST.Range;
|
|
4
|
+
import type { SourceRange } from '../types.js';
|
|
6
5
|
/**
|
|
7
6
|
* Class to manage skip ranges.
|
|
8
7
|
*/
|
|
9
|
-
export
|
|
8
|
+
export declare class SkipRanges {
|
|
10
9
|
#private;
|
|
11
10
|
/**
|
|
12
11
|
* Push a `range` to the set of skip ranges. (Method chaining supported.)
|
|
@@ -19,4 +18,3 @@ export default class SkipRanges {
|
|
|
19
18
|
*/
|
|
20
19
|
includes(offset: number): boolean;
|
|
21
20
|
}
|
|
22
|
-
export {};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* Class to manage skip ranges.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export class SkipRanges {
|
|
11
11
|
// ------------------------------------------------------------------------------
|
|
12
12
|
// Private Property
|
|
13
13
|
// ------------------------------------------------------------------------------
|
|
@@ -14,7 +14,7 @@ const statefulRegexFlagRegex = /[gy]/u;
|
|
|
14
14
|
* @param text Text to test.
|
|
15
15
|
* @returns Whether the regex matches the text.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export function testRegexStateless(regex, text) {
|
|
18
18
|
return statefulRegexFlagRegex.test(regex.flags)
|
|
19
19
|
? new RegExp(regex).test(text)
|
|
20
20
|
: regex.test(text);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Rule to enforce consistent code style.
|
|
3
3
|
* @author lumir(lumirlumir)
|
|
4
4
|
*/
|
|
5
|
-
type CodeStyle
|
|
5
|
+
import { type CodeStyle } from '../core/utils/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Options for the `consistent-code-style` rule.
|
|
8
8
|
*/
|
|
@@ -26,7 +26,6 @@ type RuleOptions = [
|
|
|
26
26
|
}
|
|
27
27
|
];
|
|
28
28
|
type MessageIds = 'style' | 'blankLineAbove' | 'blankLineBelow';
|
|
29
|
-
declare const CODE_STYLE: readonly ["indent", "fence-backtick", "fence-tilde"];
|
|
30
29
|
declare const _default: {
|
|
31
30
|
readonly meta: {
|
|
32
31
|
readonly type: "layout";
|
|
@@ -14,29 +14,9 @@
|
|
|
14
14
|
// --------------------------------------------------------------------------------
|
|
15
15
|
// Import
|
|
16
16
|
// --------------------------------------------------------------------------------
|
|
17
|
-
import { isBlankLine } from '../core/utils/index.js';
|
|
17
|
+
import { CODE_STYLE, getCodeStyle, isBlankLine, } from '../core/utils/index.js';
|
|
18
18
|
import { URL_RULE_DOCS } from '../core/constants.js';
|
|
19
19
|
// --------------------------------------------------------------------------------
|
|
20
|
-
// Helper
|
|
21
|
-
// --------------------------------------------------------------------------------
|
|
22
|
-
const CODE_STYLE = ['indent', 'fence-backtick', 'fence-tilde'];
|
|
23
|
-
/**
|
|
24
|
-
* Get the current code style based on the given text.
|
|
25
|
-
* @param text The text to determine the code style from.
|
|
26
|
-
* @returns The current code style.
|
|
27
|
-
*/
|
|
28
|
-
function getCurrentCodeStyle(text) {
|
|
29
|
-
if (text === '`') {
|
|
30
|
-
return 'fence-backtick';
|
|
31
|
-
}
|
|
32
|
-
else if (text === '~') {
|
|
33
|
-
return 'fence-tilde';
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
return 'indent';
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
// --------------------------------------------------------------------------------
|
|
40
20
|
// Rule Definition
|
|
41
21
|
// --------------------------------------------------------------------------------
|
|
42
22
|
export default {
|
|
@@ -116,7 +96,7 @@ export default {
|
|
|
116
96
|
const { start, end } = sourceCode.getLoc(node);
|
|
117
97
|
const [nodeStartOffset] = sourceCode.getRange(node);
|
|
118
98
|
const currentCodeFenceChar = sourceCode.text[nodeStartOffset];
|
|
119
|
-
const currentCodeStyle =
|
|
99
|
+
const currentCodeStyle = getCodeStyle(currentCodeFenceChar);
|
|
120
100
|
const nodeStartLineIndex = start.line - 1;
|
|
121
101
|
const nodeEndLineIndex = end.line - 1;
|
|
122
102
|
if (codeStyle === null) {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Rule to enforce consistent heading style.
|
|
3
|
+
* @author Ga eun Lee(tooth-is-silver)
|
|
4
|
+
* @author lumir(lumirlumir)
|
|
5
|
+
* @see https://github.com/DavidAnson/markdownlint/blob/v0.41.1/lib/md003.mjs
|
|
6
|
+
*/
|
|
7
|
+
import type { Heading } from 'mdast';
|
|
8
|
+
type HeadingStyle = (typeof HEADING_STYLE)[number];
|
|
9
|
+
type RuleOptions = [{
|
|
10
|
+
style: HeadingStyle;
|
|
11
|
+
}];
|
|
12
|
+
type MessageIds = 'style' | 'suggestAtxToSetext' | 'suggestAtxClosedToSetext';
|
|
13
|
+
declare const HEADING_STYLE: readonly ["consistent", "atx", "atx-closed", "setext", "setext-with-atx", "setext-with-atx-closed"];
|
|
14
|
+
declare const _default: {
|
|
15
|
+
readonly meta: {
|
|
16
|
+
readonly type: "layout";
|
|
17
|
+
readonly docs: {
|
|
18
|
+
readonly description: "Enforce consistent heading style";
|
|
19
|
+
readonly url: string;
|
|
20
|
+
readonly recommended: false;
|
|
21
|
+
readonly stylistic: true;
|
|
22
|
+
};
|
|
23
|
+
readonly fixable: "code";
|
|
24
|
+
readonly hasSuggestions: true;
|
|
25
|
+
readonly schema: [{
|
|
26
|
+
readonly type: "object";
|
|
27
|
+
readonly properties: {
|
|
28
|
+
readonly style: {
|
|
29
|
+
readonly enum: readonly ["consistent", "atx", "atx-closed", "setext", "setext-with-atx", "setext-with-atx-closed"];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
readonly additionalProperties: false;
|
|
33
|
+
}];
|
|
34
|
+
readonly defaultOptions: [{
|
|
35
|
+
readonly style: "consistent";
|
|
36
|
+
}];
|
|
37
|
+
readonly messages: {
|
|
38
|
+
readonly style: "Heading style should be `{{ style }}`.";
|
|
39
|
+
readonly suggestAtxToSetext: "Replace ATX heading with a Setext heading.";
|
|
40
|
+
readonly suggestAtxClosedToSetext: "Replace ATX closed heading with a Setext heading.";
|
|
41
|
+
};
|
|
42
|
+
readonly language: "markdown";
|
|
43
|
+
readonly dialects: ["commonmark", "gfm"];
|
|
44
|
+
};
|
|
45
|
+
readonly create: (context: import("../core/types.js").RuleContext<{
|
|
46
|
+
RuleOptions: RuleOptions;
|
|
47
|
+
MessageIds: MessageIds;
|
|
48
|
+
}>) => {
|
|
49
|
+
heading(node: Heading): void;
|
|
50
|
+
"heading[depth<=2]"(): void;
|
|
51
|
+
"heading[depth>2]"(): void;
|
|
52
|
+
'heading:exit'(node: Heading): void;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export default _default;
|