Skip to content

introduce doc linter

This is an attempt to introduce a simple linter for our documentation files.

The doc linter scans all the .md files in the doc/api directory and invokes the linter rule functions one by one, passing the file name, contents and an array to fill the errors.

If the errors array is not empty, then the linter will exit with code 1

This PR has one rule, which checks if the links in the documentation file are in sorted order. It expects alphabetical link text to be at the top and everything else following them.


Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

build doc tools


cc @nodejs/documentation

Merge request reports

Loading