Reference configs

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.js never runs and nothing reports it. Changelogs follow CHANGELOG_V<major>.md, checked only when someone reviews the release. Two filename_regex 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.yml, 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/node_version.h that the release pipeline reads, the remark packages the Markdown linter needs and strict mode in tsconfig.json. It checks that the TSC list in README.md stays sorted, rejects fixup commits, and runs the Makefile's linters from command_idempotent rules.

.alint.yml
- 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: error

The runner's naming rule, checked in five test directories. The shared common and index files and the helpers in test/async-hooks/ are left out; they're not tests.

.alint.yml
- 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: error

One changelog per major version, plus a few historical ones such as io.js.

.alint.yml
- 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: warning

The 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.mjs, which compares documentation with the current pull request, and lint-readme-lists.mjs, which checks the README's lists against GitHub teams;
  • the commit-message check in commit-lint.yml, which validates the subsystem prefixes and trailers.