nodejs/node: checking the test names its runner depends on
The Node.js test runner only runs files named test-*, so a test called tst-foo never runs and nothing reports it. Changelogs follow CHANGELOG_, checked only when someone reviews the release. Two filename_ rules check both.This config was written to test alint; Node.js doesn't use alint.
What alint found
The bundled GitHub Actions rules (alint 0.16.1, on the workflows as of 7 May 2026) flag one of its 36 workflows, create-release-proposal, for granting contents: write at the workflow level. The rest limit the token.
The config
The config checks the test and changelog names, the version header in src/ that the release pipeline reads, the remark packages the Markdown linter needs and strict mode in tsconfig. It checks that the TSC list in README stays sorted, rejects fixup commits, and runs the Makefile's linters from command_ rules.
- id: node-test-filename-grammar
# fixed here: leaves out the three async-hooks helpers
kind: filename_regex
paths:
include:
- "test/parallel/*.{js,mjs,cjs}"
- "test/sequential/*.{js,mjs,cjs}"
- "test/async-hooks/*.{js,mjs,cjs}"
- "test/es-module/*.{js,mjs,cjs}"
- "test/known_issues/*.{js,mjs,cjs}"
exclude:
- "test/*/index.{js,mjs,cjs}"
- "test/*/common.{js,mjs,cjs}"
- "test/*/eslint.config_partial.mjs"
- "test/async-hooks/{hook-checks,init-hooks,verify-graph}.js"
pattern: '^test-[A-Za-z0-9][A-Za-z0-9_.-]*\.(js|mjs|cjs)$'
level: errorThe runner's naming rule, checked in five test directories. The shared common and index files and the helpers in test/ are left out; they're not tests.
- id: node-changelog-per-major-filename
kind: filename_regex
paths:
include: ["doc/changelogs/CHANGELOG_*.md" ]
pattern: '^CHANGELOG_(V[0-9]+|V010|V012|IOJS|ARCHIVE)\.md$'
level: errorOne changelog per major version, plus a few historical ones such as io.js.
- id: node-readme-tsc-order
# fixed here: literal heading markers; sort the "* [handle]" lines only
when: facts.has_node_src
kind: ordered_block
paths: "README.md"
start: "#### TSC voting members"
end: "#### TSC regular members"
select: '^\* \['
comparator: lexical-ci
level: warningThe TSC list in the README must stay sorted by GitHub handle, ignoring case. Each entry takes two lines, so the rule sorts only the lines that start an entry; a second rule could do the same for the collaborators.
Speed
In the May run, on a checkout of 8,214 files without deps/ and the two largest test directories, the rules that don't call other tools took 60 ms.
What stays outside alint
What reads JavaScript or C++ as code, or asks GitHub, stays with the Node.js tools:
- the 27 custom ESLint rules and cpplint, which parse the code;
lint-pr-url, which compares documentation with the current pull request, and.mjs lint-readme-lists, which checks the README's lists against GitHub teams;.mjs - the commit-message check in
commit-lint, which validates the subsystem prefixes and trailers..yml