GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: clarify README linter error message · nodejs/node@195d603

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tools
    • lint-readme-lists.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tools/lint-readme-lists.mjs‎

Copy file name to clipboardExpand all lines: tools/lint-readme-lists.mjs
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import assert from 'node:assert';
66
import { open } from 'node:fs/promises';
77
import { argv } from 'node:process';
88

9-
const ghHandleLine = /^\* \[(.+)\]\(https:\/\/github\.com\/\1\) -$/;
9+
const ghHandleLine = /^\* \[(.+)\]\(https:\/\/github\.com\/(.+)\) -$/;
1010
const memberInfoLine = /^ {2}\*\*[^*]+\*\* <<[^@]+@.+\.[a-z]+>>( \(\w+(\/[^)/]+)+\))?( - \[Support me\]\(.+\))?$/;
1111

1212
const lists = {
@@ -59,9 +59,11 @@ for await (const line of readme.readLines()) {
5959
);
6060
}
6161

62-
if (!ghHandleLine.test(line)) {
63-
throw new Error(`${currentGithubHandle} is not formatted correctly (README.md:${lineNumber})`);
62+
const match = line.match(ghHandleLine);
63+
if (!match) {
64+
throw new Error(`${line} should match ${ghHandleLine} (README.md:${lineNumber})`);
6465
}
66+
assert.strictEqual(match[1], match[2], `GitHub handle does not match the URL (README.md:${lineNumber})`);
6567

6668
if (
6769
currentList === 'TSC voting members' ||

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.