From 8200db914136a70811753346d68c75dcb9964df3 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien <567105+nstepien@users.noreply.github.com> Date: Tue, 5 May 2026 20:44:21 +0100 Subject: [PATCH] Node.js 26 (#4037) * Node.js 26 * remove false positives --- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 2 +- .github/workflows/update-screenshots.yml | 2 +- eslint.config.ts | 29 ++++++------------------ package.json | 7 ++++++ src/hooks/useCalculatedColumns.ts | 2 -- 6 files changed, 17 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f352cb98f6..be3532985a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/setup-node@v6 with: - node-version: 25 + node-version-file: 'package.json' check-latest: true - name: Install dependencies diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 46dc044da7..b9e761e697 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/setup-node@v6 with: - node-version: 25 + node-version-file: 'package.json' check-latest: true registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/update-screenshots.yml b/.github/workflows/update-screenshots.yml index 1908f54a93..7a29a858bd 100644 --- a/.github/workflows/update-screenshots.yml +++ b/.github/workflows/update-screenshots.yml @@ -25,7 +25,7 @@ jobs: ref: ${{ github.head_ref }} - uses: actions/setup-node@v6 with: - node-version: 25 + node-version-file: 'package.json' check-latest: true - name: Remove label if: github.event_name == 'pull_request' diff --git a/eslint.config.ts b/eslint.config.ts index 9f43a22dcb..2f228ba2e9 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -278,29 +278,14 @@ export default defineConfig([ // https://www.eslint-react.xyz/docs/rules/overview /* // copy all the rules from the rules table for easy pasting -function getRules(id) { - return ( - Iterator.from( - document - // select rules table - .querySelector(`#${id} ~ *:has(table) > table`) - // select all rule links - .querySelectorAll('tr a') - ) - // map link to rule declaration - .map((a) => `'@eslint-react/${a.pathname.slice(a.pathname.lastIndexOf('/') + 1)}': 1,`) - ); -} copy( - Iterator.from([ - getRules('x-rules'), - getRules('jsx-rules'), - getRules('rsc-rules'), - getRules('dom-rules'), - getRules('web-api-rules'), - getRules('naming-convention-rules'), - ]) - .flatMap((x) => x) + Iterator.from( + document + // select all non-debug rule links + .querySelectorAll('tr a:not([href*="rules/debug"])') + ) + // map link to rule declaration + .map((a) => `'@eslint-react/${a.pathname.slice(a.pathname.lastIndexOf('/') + 1)}': 1,`) .toArray() .join('\n') ); diff --git a/package.json b/package.json index d99230f8e0..63d3231012 100644 --- a/package.json +++ b/package.json @@ -83,5 +83,12 @@ "peerDependencies": { "react": "^19.2", "react-dom": "^19.2" + }, + "devEngines": { + "runtime": { + "name": "node", + "version": "^26.0.0", + "onFail": "warn" + } } } diff --git a/src/hooks/useCalculatedColumns.ts b/src/hooks/useCalculatedColumns.ts index 8dbb7f7893..9929d91a17 100644 --- a/src/hooks/useCalculatedColumns.ts +++ b/src/hooks/useCalculatedColumns.ts @@ -177,12 +177,10 @@ export function useCalculatedColumns({ let width = getColumnWidth(column); if (typeof width === 'number') { - // eslint-disable-next-line @eslint-react/use-memo width = clampColumnWidth(width, column); } else { // This is a placeholder width so we can continue to use virtualization. // The actual value is set after the column is rendered - // eslint-disable-next-line @eslint-react/use-memo width = column.minWidth; } templateColumns.push(`${width}px`);