Skip to content

Commit b5e7d1b

Browse files
committed
doc: use @node-core/remark-lint for linting
1 parent 6964b53 commit b5e7d1b

38 files changed

Lines changed: 4495 additions & 3083 deletions

.github/dependabot.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,6 @@ updates:
2727
patterns:
2828
- '*'
2929

30-
- package-ecosystem: npm
31-
directory: /tools/lint-md
32-
schedule:
33-
interval: monthly
34-
cooldown:
35-
semver-major-days: 5
36-
semver-minor-days: 5
37-
semver-patch-days: 5
38-
commit-message:
39-
prefix: tools
40-
open-pull-requests-limit: 10
41-
groups:
42-
lint-md:
43-
applies-to: version-updates
44-
patterns:
45-
- '*'
46-
4730
- package-ecosystem: npm
4831
directory: /tools/doc
4932
schedule:

.github/workflows/build-tarball.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on:
2222
- tools/doc/**
2323
- tools/eslint-rules/**
2424
- tools/eslint/**
25-
- tools/lint-md/**
2625
- typings/**
2726
- vcbuild.bat
2827
- .**
@@ -51,7 +50,6 @@ on:
5150
- tools/doc/**
5251
- tools/eslint-rules/**
5352
- tools/eslint/**
54-
- tools/lint-md/**
5553
- typings/**
5654
- vcbuild.bat
5755
- .**

.github/workflows/coverage-windows.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on:
2222
- tools/doc/**
2323
- tools/eslint-rules/**
2424
- tools/eslint/**
25-
- tools/lint-md/**
2625
- typings/**
2726
- .**
2827
- '!.github/workflows/coverage-windows.yml'
@@ -48,7 +47,6 @@ on:
4847
- tools/doc/**
4948
- tools/eslint-rules/**
5049
- tools/eslint/**
51-
- tools/lint-md/**
5250
- typings/**
5351
- .**
5452
- '!.github/workflows/coverage-windows.yml'

.github/workflows/linters.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ jobs:
130130
echo
131131
exit "$EXIT_CODE"
132132
fi
133-
- name: Get release version numbers
134-
if: ${{ github.event.pull_request && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch }}
135-
id: get-released-versions
136-
run: ./tools/lint-md/list-released-versions-from-changelogs.mjs >> $GITHUB_OUTPUT
137133
- name: Lint markdown files
138134
run: |
139135
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"

.github/workflows/test-macos.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on:
2222
- tools/doc/**
2323
- tools/eslint-rules/**
2424
- tools/eslint/**
25-
- tools/lint-md/**
2625
- typings/**
2726
- vcbuild.bat
2827
- .**
@@ -52,7 +51,6 @@ on:
5251
- tools/doc/**
5352
- tools/eslint-rules/**
5453
- tools/eslint/**
55-
- tools/lint-md/**
5654
- typings/**
5755
- vcbuild.bat
5856
- .**

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ release.
155155
LTS releases.
156156
* Release versions in **bold** text are the most recent supported releases.
157157

158-
***
158+
---
159159

160-
***
160+
---
161161

162162
## 2016-05-06, Version 0.12.14 (Maintenance), @rvagg
163163

Makefile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,24 +1403,20 @@ LINT_MD_TARGETS = doc src lib benchmark test tools/doc tools/icu $(wildcard *.md
14031403
LINT_MD_FILES = $(shell $(FIND) $(LINT_MD_TARGETS) -type f \
14041404
! -path '*node_modules*' ! -path 'test/fixtures/*' -name '*.md' \
14051405
$(LINT_MD_NEWER))
1406-
run-lint-md = tools/lint-md/lint-md.mjs $(LINT_MD_FILES)
1407-
1408-
# Check for a specific file, as (empty) directories are persisted in git.
1409-
tools/lint-md/node_modules/remark-parse/package.json:
1410-
-cd tools/lint-md && $(call available-node,$(run-npm-ci))
1406+
run-lint-md = tools/doc/lint-md.mjs $(LINT_MD_FILES)
14111407

14121408
# Lint all changed markdown files maintained by us
1413-
tools/.mdlintstamp: tools/lint-md/node_modules/remark-parse/package.json $(LINT_MD_FILES)
1409+
tools/.mdlintstamp: tools/doc/node_modules $(LINT_MD_FILES)
14141410
$(info Running Markdown linter...)
14151411
@$(call available-node,$(run-lint-md))
14161412
@touch $@
14171413

14181414
.PHONY: lint-md
14191415
lint-md: lint-js-doc | tools/.mdlintstamp ## Lint the markdown documents maintained by us in the codebase.
14201416

1421-
run-format-md = tools/lint-md/lint-md.mjs --format $(LINT_MD_FILES)
1417+
run-format-md = tools/doc/lint-md.mjs --format $(LINT_MD_FILES)
14221418
.PHONY: format-md
1423-
format-md: tools/lint-md/node_modules/remark-parse/package.json ## Format the markdown documents maintained by us in the codebase.
1419+
format-md: tools/doc/node_modules ## Format the markdown documents maintained by us in the codebase.
14241420
$(info Formatting Markdown...)
14251421
@$(call available-node,$(run-format-md))
14261422

@@ -1659,7 +1655,6 @@ lint-clean: ## Remove linting artifacts.
16591655
$(RM) tools/.*lintstamp
16601656
$(RM) .eslintcache
16611657
$(RM) -r tools/eslint/node_modules
1662-
$(RM) -r tools/lint-md/node_modules
16631658
$(RM) tools/pip/site_packages
16641659

16651660
HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)

doc/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ professionalism across all documents.
1515
7. [Formatting](#formatting)
1616
8. [Product and Project Naming](#product-and-project-naming)
1717

18-
***
18+
---
1919

2020
## General guidelines
2121

@@ -38,7 +38,7 @@ professionalism across all documents.
3838

3939
* Validate documentation changes using `make test-doc -j` or `vcbuild test-doc`.
4040

41-
***
41+
---
4242

4343
## Writing style
4444

@@ -68,7 +68,7 @@ professionalism across all documents.
6868
* Use precise technical terms and avoid colloquialisms.
6969
* Define any specialized terms or acronyms at first use.
7070

71-
***
71+
---
7272

7373
## Punctuation
7474

@@ -87,7 +87,7 @@ professionalism across all documents.
8787
* Use colons to introduce lists or explanations.
8888
* Use semicolons to link closely related independent clauses.
8989

90-
***
90+
---
9191

9292
## Document structure
9393

@@ -109,7 +109,7 @@ professionalism across all documents.
109109

110110
* Use tables to present structured information clearly. Ensure they are readable in plain text.
111111

112-
***
112+
---
113113

114114
## API documentation
115115

@@ -129,7 +129,7 @@ professionalism across all documents.
129129
* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`.
130130
```
131131

132-
***
132+
---
133133

134134
## Code blocks
135135

@@ -165,7 +165,7 @@ professionalism across all documents.
165165
* Use comments to explain complex logic within code examples.
166166
* Follow the standard commenting style of the respective language.
167167

168-
***
168+
---
169169

170170
## Formatting
171171

@@ -198,7 +198,7 @@ professionalism across all documents.
198198
* Returns: {AsyncHook} A reference to `asyncHook`.
199199
```
200200

201-
***
201+
---
202202

203203
## Product and project naming
204204

@@ -225,7 +225,7 @@ professionalism across all documents.
225225

226226
For topics not addressed here, please consult the [Microsoft Writing Style Guide][].
227227

228-
***
228+
---
229229

230230
[Microsoft Writing Style Guide]: https://learn.microsoft.com/en-us/style-guide/welcome/
231231
[US spelling]: https://learn.microsoft.com/en-us/style-guide/word-choice/use-us-spelling-avoid-non-english-words

doc/api/buffer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ changes:
10391039
description: The elements of `list` can now be `Uint8Array`s.
10401040
-->
10411041

1042-
* `list` {Buffer\[] | Uint8Array\[]} List of `Buffer` or {Uint8Array}
1042+
* `list` {Buffer\[]|Uint8Array\[]} List of `Buffer` or {Uint8Array}
10431043
instances to concatenate.
10441044
* `totalLength` {integer} Total length of the `Buffer` instances in `list`
10451045
when concatenated.
@@ -5288,7 +5288,7 @@ added:
52885288
- v18.15.0
52895289
-->
52905290

5291-
* `input` {Buffer | ArrayBuffer | TypedArray} The input to validate.
5291+
* `input` {Buffer|ArrayBuffer|TypedArray} The input to validate.
52925292
* Returns: {boolean}
52935293

52945294
This function returns `true` if `input` contains only valid ASCII-encoded data,
@@ -5304,7 +5304,7 @@ added:
53045304
- v18.14.0
53055305
-->
53065306

5307-
* `input` {Buffer | ArrayBuffer | TypedArray} The input to validate.
5307+
* `input` {Buffer|ArrayBuffer|TypedArray} The input to validate.
53085308
* Returns: {boolean}
53095309

53105310
This function returns `true` if `input` contains only valid UTF-8-encoded data,

0 commit comments

Comments
 (0)