Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,10 @@ jobs:
persist-credentials: false
# GH Actions squashes all PR commits, HEAD^ refers to the base branch.
- run: git diff HEAD^ HEAD -G"pr-url:" -- "*.md" | ./tools/lint-pr-url.mjs ${{ github.event.pull_request.html_url }}
lint-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
- run: tools/lint-readme-lists.mjs
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@ For information about the governance of the Node.js project, see
**Erick Wendel** <<[email protected]>> (he/him)
* [Ethan-Arrowood](https://github.com/Ethan-Arrowood) -
**Ethan Arrowood** <<[email protected]>> (he/him)
* [fhinkel](https://github.com/fhinkel) -
**Franziska Hinkelmann** <<[email protected]>> (she/her)
* [F3n67u](https://github.com/F3n67u) -
**Feng Yu** <<[email protected]>> (he/him)
* [fhinkel](https://github.com/fhinkel) -
**Franziska Hinkelmann** <<[email protected]>> (she/her)
* [Flarna](https://github.com/Flarna) -
**Gerhard Stöbich** <<[email protected]>> (he/they)
* [gabrielschulhof](https://github.com/gabrielschulhof) -
Expand Down Expand Up @@ -429,12 +429,12 @@ For information about the governance of the Node.js project, see
**Stephen Belanger** <<[email protected]>> (he/him)
* [RafaelGSS](https://github.com/RafaelGSS) -
**Rafael Gonzaga** <<[email protected]>> (he/him)
* [rluvaton](https://github.com/rluvaton) -
**Raz Luvaton** <<[email protected]>> (he/him)
* [richardlau](https://github.com/richardlau) -
**Richard Lau** <<[email protected]>>
* [rickyes](https://github.com/rickyes) -
**Ricky Zhou** <<[email protected]>> (he/him)
* [rluvaton](https://github.com/rluvaton) -
**Raz Luvaton** <<[email protected]>> (he/him)
* [ronag](https://github.com/ronag) -
**Robert Nagy** <<[email protected]>>
* [ruyadorno](https://github.com/ruyadorno) -
Expand Down Expand Up @@ -477,10 +477,10 @@ For information about the governance of the Node.js project, see
**Khaidi Chu** <<[email protected]>> (he/him)
* [yashLadha](https://github.com/yashLadha) -
**Yash Ladha** <<[email protected]>> (he/him)
* [ZYSzys](https://github.com/ZYSzys) -
**Yongsheng Zhang** <<[email protected]>> (he/him)
* [zcbenz](https://github.com/zcbenz) -
**Cheng Zhao** <<[email protected]>> (he/him)
* [ZYSzys](https://github.com/ZYSzys) -
**Yongsheng Zhang** <<[email protected]>> (he/him)

<details>

Expand All @@ -495,10 +495,10 @@ For information about the governance of the Node.js project, see
**Aleksei Koziatinskii** <<[email protected]>>
* [andrasq](https://github.com/andrasq) -
**Andras** <<[email protected]>>
* [AnnaMag](https://github.com/AnnaMag) -
**Anna M. Kedzierska** <<[email protected]>>
* [AndreasMadsen](https://github.com/AndreasMadsen) -
**Andreas Madsen** <<[email protected]>> (he/him)
* [AnnaMag](https://github.com/AnnaMag) -
**Anna M. Kedzierska** <<[email protected]>>
* [aqrln](https://github.com/aqrln) -
**Alexey Orlenko** <<[email protected]>> (he/him)
* [bcoe](https://github.com/bcoe) -
Expand Down Expand Up @@ -741,10 +741,10 @@ maintaining the Node.js project.
**Mert Can Altin** <<[email protected]>>
* [Mesteery](https://github.com/Mesteery) -
**Mestery** <<[email protected]>> (he/him)
* [preveen-stack](https://github.com/preveen-stack) -
**Preveen Padmanabhan** <<[email protected]>> (he/him)
* [PoojaDurgad](https://github.com/PoojaDurgad) -
**Pooja Durgad** <<[email protected]>>
* [preveen-stack](https://github.com/preveen-stack) -
**Preveen Padmanabhan** <<[email protected]>> (he/him)
* [VoltrexKeyva](https://github.com/VoltrexKeyva) -
**Mohammed Keyvanzadeh** <<[email protected]>> (he/him)

Expand Down
48 changes: 48 additions & 0 deletions tools/lint-readme-lists.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env node

// Validates the list in the README are in the correct order.

import { open } from 'node:fs/promises';

const lists = [
'TSC voting members',
'TSC regular members',
'TSC emeriti members',
'Collaborators',
'Collaborator emeriti',
'Triagers',
];
const tscMembers = new Set();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename this to nonCollabatorTscMembers?


const readme = await open(new URL('../README.md', import.meta.url), 'r');

let currentList = null;
let previousGithubHandle;
let lineNumber = 0;

for await (const line of readme.readLines()) {
lineNumber++;
if (line.startsWith('### ')) {
currentList = lists[lists.indexOf(line.slice(4))];
previousGithubHandle = null;
} else if (line.startsWith('#### ')) {
currentList = lists[lists.indexOf(line.slice(5))];
previousGithubHandle = null;
} else if (currentList && line.startsWith('* [')) {
const currentGithubHandle = line.slice(3, line.indexOf(']')).toLowerCase();
if (previousGithubHandle && previousGithubHandle >= currentGithubHandle) {
throw new Error(`${currentGithubHandle} should be listed before ${previousGithubHandle} in the ${currentList} list (README.md:${lineNumber})`);
}

if (currentList === 'TSC voting members' || currentList === 'TSC regular members') {
tscMembers.add(currentGithubHandle);
} else if (currentList === 'Collaborators') {
tscMembers.delete(currentGithubHandle);
}
previousGithubHandle = currentGithubHandle;
}
}

if (tscMembers.size !== 0) {
throw new Error(`Some TSC members are not listed as Collaborators: ${Array.from(tscMembers)}`);
}