eslint-plugin-markdown-preferences 0.40.1 → 0.40.3
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/lib/{chunk-BAz01cYq.js → chunk-CzXV76rE.js} +2 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +20 -12
- package/package.json +22 -22
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region rolldown:runtime
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var
|
|
3
|
+
var __exportAll = (all, symbols) => {
|
|
4
4
|
let target = {};
|
|
5
5
|
for (var name in all) {
|
|
6
6
|
__defProp(target, name, {
|
|
@@ -15,4 +15,4 @@ var __export = (all, symbols) => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
18
|
-
export {
|
|
18
|
+
export { __exportAll as t };
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { MarkdownSourceCode } from "@eslint/markdown";
|
|
2
2
|
import * as math from "mdast-util-math";
|
|
3
3
|
import * as _eslint_core0 from "@eslint/core";
|
|
4
4
|
import { File, Language, OkParseResult, ParseResult, RuleDefinition, SourceLocation } from "@eslint/core";
|
|
@@ -623,7 +623,7 @@ declare const languageOptions$1: {
|
|
|
623
623
|
frontmatter: string;
|
|
624
624
|
};
|
|
625
625
|
declare const plugins$1: {
|
|
626
|
-
markdown:
|
|
626
|
+
markdown: ESLint.Plugin;
|
|
627
627
|
readonly "markdown-preferences": ESLint.Plugin;
|
|
628
628
|
};
|
|
629
629
|
declare const rules$2: Linter.RulesRecord;
|
|
@@ -637,7 +637,7 @@ declare const languageOptions: {
|
|
|
637
637
|
frontmatter: string;
|
|
638
638
|
};
|
|
639
639
|
declare const plugins: {
|
|
640
|
-
markdown:
|
|
640
|
+
markdown: ESLint.Plugin;
|
|
641
641
|
readonly "markdown-preferences": ESLint.Plugin;
|
|
642
642
|
};
|
|
643
643
|
declare const rules$1: Linter.RulesRecord;
|
|
@@ -645,7 +645,7 @@ declare namespace meta_d_exports {
|
|
|
645
645
|
export { name, version };
|
|
646
646
|
}
|
|
647
647
|
declare const name: "eslint-plugin-markdown-preferences";
|
|
648
|
-
declare const version: "0.40.
|
|
648
|
+
declare const version: "0.40.3";
|
|
649
649
|
//#endregion
|
|
650
650
|
//#region src/language/ast-types.d.ts
|
|
651
651
|
type Node = mdast.Node;
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as __exportAll } from "./chunk-CzXV76rE.js";
|
|
2
2
|
import stringWidth from "string-width";
|
|
3
3
|
import emojiRegex from "emoji-regex-xs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -7987,6 +7987,13 @@ var no_heading_trailing_punctuation_default = createRule("no-heading-trailing-pu
|
|
|
7987
7987
|
const sourceCode = context.sourceCode;
|
|
7988
7988
|
const segmenter$1 = new Intl.Segmenter("en", { granularity: "grapheme" });
|
|
7989
7989
|
const punctuationMap = buildPunctuationMap(context.options[0]?.punctuation, segmenter$1);
|
|
7990
|
+
const contentNodeTypes = new Set([
|
|
7991
|
+
"inlineCode",
|
|
7992
|
+
"image",
|
|
7993
|
+
"imageReference",
|
|
7994
|
+
"html",
|
|
7995
|
+
"inlineMath"
|
|
7996
|
+
]);
|
|
7990
7997
|
return { heading(node) {
|
|
7991
7998
|
if (!node.children.length) return;
|
|
7992
7999
|
const punctuationChars = punctuationMap[node.depth];
|
|
@@ -8030,6 +8037,7 @@ var no_heading_trailing_punctuation_default = createRule("no-heading-trailing-pu
|
|
|
8030
8037
|
if (child.value.trim()) return child;
|
|
8031
8038
|
continue;
|
|
8032
8039
|
}
|
|
8040
|
+
if (contentNodeTypes.has(child.type)) return null;
|
|
8033
8041
|
if ("children" in child && Array.isArray(child.children)) {
|
|
8034
8042
|
const nestedLast = findLastTextNode(child.children);
|
|
8035
8043
|
if (nestedLast) return nestedLast;
|
|
@@ -9134,7 +9142,7 @@ var no_trailing_spaces_default = createRule("no-trailing-spaces", {
|
|
|
9134
9142
|
}
|
|
9135
9143
|
});
|
|
9136
9144
|
},
|
|
9137
|
-
"code, inlineCode,
|
|
9145
|
+
"code, inlineCode, yaml, toml, json"(node) {
|
|
9138
9146
|
ignoreNodes.push(node);
|
|
9139
9147
|
},
|
|
9140
9148
|
"root:exit"() {
|
|
@@ -12594,7 +12602,7 @@ var thematic_break_sequence_pattern_default = createRule("thematic-break-sequenc
|
|
|
12594
12602
|
|
|
12595
12603
|
//#endregion
|
|
12596
12604
|
//#region src/utils/rules.ts
|
|
12597
|
-
const rules$
|
|
12605
|
+
const rules$3 = [
|
|
12598
12606
|
atx_heading_closing_sequence_length_default,
|
|
12599
12607
|
atx_heading_closing_sequence_default,
|
|
12600
12608
|
blockquote_marker_alignment_default,
|
|
@@ -12652,13 +12660,13 @@ const rules$1 = [
|
|
|
12652
12660
|
|
|
12653
12661
|
//#endregion
|
|
12654
12662
|
//#region src/configs/recommended.ts
|
|
12655
|
-
var recommended_exports = /* @__PURE__ */
|
|
12663
|
+
var recommended_exports = /* @__PURE__ */ __exportAll({
|
|
12656
12664
|
files: () => files$1,
|
|
12657
12665
|
language: () => language$1,
|
|
12658
12666
|
languageOptions: () => languageOptions$1,
|
|
12659
12667
|
name: () => name$2,
|
|
12660
12668
|
plugins: () => plugins$1,
|
|
12661
|
-
rules: () => rules$
|
|
12669
|
+
rules: () => rules$2
|
|
12662
12670
|
});
|
|
12663
12671
|
const name$2 = "markdown-preferences/recommended";
|
|
12664
12672
|
const files$1 = ["*.md", "**/*.md"];
|
|
@@ -12670,7 +12678,7 @@ const plugins$1 = {
|
|
|
12670
12678
|
return src_default;
|
|
12671
12679
|
}
|
|
12672
12680
|
};
|
|
12673
|
-
const rules$
|
|
12681
|
+
const rules$2 = {
|
|
12674
12682
|
"markdown-preferences/blockquote-marker-alignment": "error",
|
|
12675
12683
|
"markdown-preferences/hard-linebreak-style": "error",
|
|
12676
12684
|
"markdown-preferences/list-marker-alignment": "error",
|
|
@@ -12683,13 +12691,13 @@ const rules$3 = {
|
|
|
12683
12691
|
|
|
12684
12692
|
//#endregion
|
|
12685
12693
|
//#region src/configs/standard.ts
|
|
12686
|
-
var standard_exports = /* @__PURE__ */
|
|
12694
|
+
var standard_exports = /* @__PURE__ */ __exportAll({
|
|
12687
12695
|
files: () => files,
|
|
12688
12696
|
language: () => language,
|
|
12689
12697
|
languageOptions: () => languageOptions,
|
|
12690
12698
|
name: () => name$1,
|
|
12691
12699
|
plugins: () => plugins,
|
|
12692
|
-
rules: () => rules$
|
|
12700
|
+
rules: () => rules$1
|
|
12693
12701
|
});
|
|
12694
12702
|
const name$1 = "markdown-preferences/recommended";
|
|
12695
12703
|
const files = ["*.md", "**/*.md"];
|
|
@@ -12701,7 +12709,7 @@ const plugins = {
|
|
|
12701
12709
|
return src_default;
|
|
12702
12710
|
}
|
|
12703
12711
|
};
|
|
12704
|
-
const rules$
|
|
12712
|
+
const rules$1 = {
|
|
12705
12713
|
"markdown-preferences/atx-heading-closing-sequence-length": "error",
|
|
12706
12714
|
"markdown-preferences/atx-heading-closing-sequence": "error",
|
|
12707
12715
|
"markdown-preferences/blockquote-marker-alignment": "error",
|
|
@@ -12749,12 +12757,12 @@ const rules$2 = {
|
|
|
12749
12757
|
|
|
12750
12758
|
//#endregion
|
|
12751
12759
|
//#region src/meta.ts
|
|
12752
|
-
var meta_exports = /* @__PURE__ */
|
|
12760
|
+
var meta_exports = /* @__PURE__ */ __exportAll({
|
|
12753
12761
|
name: () => name,
|
|
12754
12762
|
version: () => version
|
|
12755
12763
|
});
|
|
12756
12764
|
const name = "eslint-plugin-markdown-preferences";
|
|
12757
|
-
const version = "0.40.
|
|
12765
|
+
const version = "0.40.3";
|
|
12758
12766
|
|
|
12759
12767
|
//#endregion
|
|
12760
12768
|
//#region src/language/extensions/micromark-custom-container.ts
|
|
@@ -13194,7 +13202,7 @@ const configs = {
|
|
|
13194
13202
|
recommended: recommended_exports,
|
|
13195
13203
|
standard: standard_exports
|
|
13196
13204
|
};
|
|
13197
|
-
const rules = rules$
|
|
13205
|
+
const rules = rules$3.reduce((obj, r) => {
|
|
13198
13206
|
obj[r.meta.docs.ruleName] = r;
|
|
13199
13207
|
return obj;
|
|
13200
13208
|
}, {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-markdown-preferences",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.3",
|
|
4
4
|
"description": "ESLint plugin that enforces our markdown preferences",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"build": "npm run build:meta && npm run build:tsdown",
|
|
20
20
|
"build:meta": "npm run ts -- ./tools/update-meta.ts",
|
|
21
21
|
"build:tsdown": "tsdown",
|
|
22
|
-
"lint": "eslint .",
|
|
22
|
+
"lint": "eslint . --config=./eslint.config.mjs --no-config-lookup",
|
|
23
23
|
"tsc": "tsc --project tsconfig.build.json",
|
|
24
|
-
"eslint-fix": "eslint . --fix",
|
|
24
|
+
"eslint-fix": "eslint . --fix --config=./eslint.config.mjs --no-config-lookup",
|
|
25
25
|
"markdownlint": "npx -y markdownlint-cli2 .",
|
|
26
26
|
"test": "npm run mocha -- \"tests/src/**/*.ts\" --reporter=dot --timeout=60000",
|
|
27
27
|
"test:debug": "node --experimental-strip-types --experimental-transform-types ./node_modules/mocha/bin/mocha.js \"tests/src/**/*.ts\" --reporter=dot --timeout=60000",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"new": "npm run ts -- ./tools/new-rule.ts",
|
|
33
33
|
"docs:watch": "vitepress dev docs --open",
|
|
34
34
|
"docs:build": "vitepress build docs",
|
|
35
|
-
"ts": "node --import
|
|
35
|
+
"ts": "node --import @oxc-node/core/register",
|
|
36
36
|
"mocha": "npm run ts -- ./node_modules/mocha/bin/mocha.js",
|
|
37
37
|
"generate:version": "env-cmd -e version -- npm run update && npm run lint -- --fix",
|
|
38
38
|
"changeset:version": "env-cmd -e version -- changeset version && npm run generate:version && git add --all",
|
|
@@ -81,11 +81,12 @@
|
|
|
81
81
|
"@changesets/cli": "^2.28.1",
|
|
82
82
|
"@changesets/get-release-plan": "^4.0.8",
|
|
83
83
|
"@eslint/core": "^1.0.0",
|
|
84
|
-
"@eslint/markdown": "^7.
|
|
85
|
-
"@ota-meshi/eslint-plugin": "^0.
|
|
86
|
-
"@
|
|
84
|
+
"@eslint/markdown": "^7.5.1",
|
|
85
|
+
"@ota-meshi/eslint-plugin": "^0.20.0",
|
|
86
|
+
"@oxc-node/core": "^0.0.35",
|
|
87
|
+
"@shikijs/vitepress-twoslash": "^4.0.0",
|
|
87
88
|
"@types/eslint": "^9.6.1",
|
|
88
|
-
"@types/eslint-scope": "^
|
|
89
|
+
"@types/eslint-scope": "^9.0.0",
|
|
89
90
|
"@types/eslint-utils": "^3.0.5",
|
|
90
91
|
"@types/estree": "^1.0.6",
|
|
91
92
|
"@types/json-schema": "^7.0.15",
|
|
@@ -94,46 +95,45 @@
|
|
|
94
95
|
"@types/node": "^24.0.0",
|
|
95
96
|
"@types/semver": "^7.5.8",
|
|
96
97
|
"assert": "^2.1.0",
|
|
97
|
-
"c8": "^
|
|
98
|
+
"c8": "^11.0.0",
|
|
98
99
|
"env-cmd": "^11.0.0",
|
|
99
|
-
"eslint": "^
|
|
100
|
+
"eslint": "^10.0.0",
|
|
100
101
|
"eslint-compat-utils": "^0.6.4",
|
|
101
102
|
"eslint-config-prettier": "^10.1.1",
|
|
102
103
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
103
104
|
"eslint-plugin-eslint-plugin": "^7.0.0",
|
|
104
|
-
"eslint-plugin-jsdoc": "^
|
|
105
|
-
"eslint-plugin-json-schema-validator": "^
|
|
105
|
+
"eslint-plugin-jsdoc": "^62.0.0",
|
|
106
|
+
"eslint-plugin-json-schema-validator": "^6.0.0",
|
|
106
107
|
"eslint-plugin-jsonc": "^2.19.1",
|
|
107
108
|
"eslint-plugin-markdown": "^5.1.0",
|
|
108
109
|
"eslint-plugin-markdown-links": "^0.7.0",
|
|
109
110
|
"eslint-plugin-n": "^17.16.2",
|
|
110
|
-
"eslint-plugin-node-dependencies": "^
|
|
111
|
+
"eslint-plugin-node-dependencies": "^2.0.0",
|
|
111
112
|
"eslint-plugin-prettier": "^5.2.3",
|
|
112
|
-
"eslint-plugin-regexp": "^
|
|
113
|
+
"eslint-plugin-regexp": "^3.0.0",
|
|
113
114
|
"eslint-plugin-vue": "^10.0.0",
|
|
114
|
-
"eslint-plugin-yml": "^
|
|
115
|
+
"eslint-plugin-yml": "^3.0.0",
|
|
115
116
|
"eslint-snapshot-rule-tester": "^0.1.0",
|
|
116
117
|
"eslint-typegen": "^2.0.0",
|
|
117
118
|
"espree": "^11.0.0",
|
|
118
119
|
"events": "^3.3.0",
|
|
119
|
-
"globals": "^
|
|
120
|
+
"globals": "^17.0.0",
|
|
120
121
|
"mocha": "^11.1.0",
|
|
121
122
|
"pako": "^2.1.0",
|
|
122
123
|
"prettier": "^3.5.3",
|
|
123
124
|
"semver": "^7.7.1",
|
|
124
|
-
"stylelint": "^
|
|
125
|
-
"stylelint-config-recommended": "^
|
|
125
|
+
"stylelint": "^17.0.0",
|
|
126
|
+
"stylelint-config-recommended": "^18.0.0",
|
|
126
127
|
"stylelint-config-recommended-vue": "^1.6.0",
|
|
127
|
-
"stylelint-config-standard": "^
|
|
128
|
+
"stylelint-config-standard": "^40.0.0",
|
|
128
129
|
"stylelint-config-standard-vue": "^1.0.0",
|
|
129
|
-
"tsdown": "^0.
|
|
130
|
-
"tsx": "^4.19.3",
|
|
130
|
+
"tsdown": "^0.19.0",
|
|
131
131
|
"twoslash-eslint": "^0.3.1",
|
|
132
132
|
"type-fest": "^5.0.0",
|
|
133
133
|
"typescript": "~5.9.0",
|
|
134
134
|
"typescript-eslint": "^8.26.1",
|
|
135
135
|
"util": "^0.12.5",
|
|
136
|
-
"vite-plugin-eslint4b": "^0.
|
|
136
|
+
"vite-plugin-eslint4b": "^0.7.0",
|
|
137
137
|
"vitepress": "^1.6.3",
|
|
138
138
|
"vue-eslint-parser": "^10.0.0"
|
|
139
139
|
},
|