help-beta: All lists should start with one after conversion.

The format step was converting our ordered list items to have
incremental numbering instead of using `1.` for every list item. This
was not because of any remark-lint rule, but because of
`remark-stringify` which auto increments any lists it processes. We
followed the recommended fix from
ae2f941d88/packages/remark-lint-ordered-list-marker-value/readme.md (L185)

We also don't need remark-lint-ordered-list-marker-value package, since
that is already part of the markdown style guide with the value we
desire. Setting it to false was a mistake in the first place.
This commit is contained in:
Shubham Padia
2025-08-04 14:48:29 +00:00
committed by Tim Abbott
parent baa87f3f0c
commit ec72c46ed6
4 changed files with 11 additions and 8 deletions

View File

@@ -45,10 +45,10 @@
"remark-lint-no-file-name-irregular-characters": "^3.0.1",
"remark-lint-no-file-name-mixed-case": "^3.0.1",
"remark-lint-no-unused-definitions": "^4.0.2",
"remark-lint-ordered-list-marker-value": "^4.0.1",
"remark-lint-unordered-list-marker-style": "^4.0.1",
"remark-preset-lint-markdown-style-guide": "^6.0.1",
"remark-preset-lint-recommended": "^7.0.1",
"remark-stringify": "^11.0.0",
"unified": "^11.0.5"
}
}

View File

@@ -23,10 +23,10 @@ import remarkLintNoDuplicateHeadings from "remark-lint-no-duplicate-headings";
import remarkLintNoFileNameIrregularCharacters from "remark-lint-no-file-name-irregular-characters";
import remarkLintNoFileNameMixedCase from "remark-lint-no-file-name-mixed-case";
import remarkLintNoUnusedDefinitions from "remark-lint-no-unused-definitions";
import remarkLintOrderedListMarkerValue from "remark-lint-ordered-list-marker-value";
import remarkLintUnorderedListMarkerStyle from "remark-lint-unordered-list-marker-style";
import remarkPresentLintMarkdownStyleGuide from "remark-preset-lint-markdown-style-guide";
import remarkLintRulesLintRecommended from "remark-preset-lint-recommended";
import remarkStringify from "remark-stringify";
const remarkLintRules = {
plugins: [
@@ -38,7 +38,6 @@ const remarkLintRules = {
[remarkLintNoUnusedDefinitions, false],
[remarkLintMaximumLineLength, false],
[remarkLintListItemIndent, false],
[remarkLintOrderedListMarkerValue, false],
[remarkLintFencedCodeFlag, false],
[remarkLintNoFileNameIrregularCharacters, false],
[remarkLintNoFileNameMixedCase, false],
@@ -52,7 +51,11 @@ const remarkLintRules = {
/** @type {Preset} */
const config = {
plugins: [[remarkFrontmatter, ["yaml"]], remarkLintRules],
plugins: [
[remarkFrontmatter, ["yaml"]],
remarkLintRules,
[remarkStringify, {incrementListMarker: false}],
],
};
export default config;