From 65ac0e8339a68797de38e6d241e98e674e28956c Mon Sep 17 00:00:00 2001 From: Salah-Eddine Saakoun Date: Tue, 17 Nov 2026 14:02:00 +0100 Subject: [PATCH 1/4] chore: turn off no-process-env and no-sync for the workflow scripts --- oxlint-suppressions.json | 60 ---------------------------------------- oxlint.config.mts | 32 ++++++++++----------- 2 files changed, 15 insertions(+), 77 deletions(-) diff --git a/oxlint-suppressions.json b/oxlint-suppressions.json index 61224d9f..e229ecab 100644 --- a/oxlint-suppressions.json +++ b/oxlint-suppressions.json @@ -2,9 +2,6 @@ ".github/actions/playwright-test-health-report/create-playwright-test-health-report.mjs": { "n/hashbang": { "count": 1 - }, - "node/no-process-env": { - "count": 12 } }, ".github/actions/playwright-test-health-report/lib/classify-report-buckets.mjs": { @@ -32,12 +29,6 @@ } }, ".github/scripts/clean-release-changelog.mts": { - "node/no-process-env": { - "count": 3 - }, - "node/no-sync": { - "count": 4 - }, "typescript/explicit-function-return-type": { "count": 4 }, @@ -55,9 +46,6 @@ "no-unused-vars": { "count": 1 }, - "node/no-process-env": { - "count": 11 - }, "object-shorthand": { "count": 4 }, @@ -90,12 +78,6 @@ "no-var": { "count": 1 }, - "node/no-process-env": { - "count": 2 - }, - "node/no-sync": { - "count": 1 - }, "require-unicode-regexp": { "count": 2 }, @@ -106,11 +88,6 @@ "count": 3 } }, - ".github/scripts/merge-previous-release-changelog.mts": { - "node/no-sync": { - "count": 3 - } - }, ".github/scripts/post-merge-validation-tracker.mjs": { "curly": { "count": 23 @@ -136,9 +113,6 @@ "no-unused-vars": { "count": 2 }, - "node/no-process-env": { - "count": 6 - }, "object-shorthand": { "count": 2 }, @@ -164,9 +138,6 @@ }, "import/unambiguous": { "count": 1 - }, - "node/no-process-env": { - "count": 3 } }, ".github/scripts/remove-rca-needed-label-sheets.ts": { @@ -182,9 +153,6 @@ "no-useless-return": { "count": 1 }, - "node/no-process-env": { - "count": 5 - }, "object-shorthand": { "count": 1 }, @@ -222,16 +190,6 @@ "count": 1 } }, - ".github/scripts/shared/environment.mts": { - "node/no-process-env": { - "count": 1 - } - }, - ".github/scripts/shared/report.mts": { - "node/no-sync": { - "count": 2 - } - }, ".github/scripts/slack-release-testing.mjs": { "id-denylist": { "count": 4 @@ -251,9 +209,6 @@ "no-var": { "count": 2 }, - "node/no-process-env": { - "count": 6 - }, "object-shorthand": { "count": 3 }, @@ -273,9 +228,6 @@ }, "n/hashbang": { "count": 1 - }, - "node/no-process-env": { - "count": 3 } }, ".github/scripts/update-release-changelog-baseline.mts": { @@ -287,12 +239,6 @@ "import/consistent-type-specifier-style": { "count": 1 }, - "node/no-process-env": { - "count": 12 - }, - "node/no-sync": { - "count": 17 - }, "typescript/explicit-function-return-type": { "count": 6 } @@ -313,12 +259,6 @@ "no-var": { "count": 1 }, - "node/no-process-env": { - "count": 1 - }, - "node/no-sync": { - "count": 1 - }, "object-shorthand": { "count": 1 }, diff --git a/oxlint.config.mts b/oxlint.config.mts index cbae98fd..7b620e22 100644 --- a/oxlint.config.mts +++ b/oxlint.config.mts @@ -3,6 +3,17 @@ import commonjs from '@metamask/oxlint-config-commonjs'; import nodejs from '@metamask/oxlint-config-nodejs'; import typescript from '@metamask/oxlint-config-typescript'; import vitest from '@metamask/oxlint-config-vitest'; +import type { OxlintConfig } from 'oxlint'; + +// Tests and workflow scripts read the environment and use synchronous APIs. +const relaxedNodeRules: OxlintConfig = { + rules: { + 'node/no-process-env': 'off', + 'node/no-sync': 'off', + }, +}; + +type Overrides = NonNullable[0]['overrides']>; export default createConfig({ extends: [base], @@ -41,27 +52,14 @@ export default createConfig({ '.github/**/*.test.{mjs,mts}', '.github/scripts/tests/**', ], - extends: [ - nodejs, - vitest, - { - // Tests read the environment and use synchronous APIs for fixtures. - rules: { - 'node/no-process-env': 'off', - 'node/no-sync': 'off', - }, - }, - ], + extends: [nodejs, vitest, relaxedNodeRules], }, { // The workflow scripts are command line programs: they read their inputs // from the environment and can use synchronous APIs. - files: ['.github/**'], - rules: { - 'node/no-process-env': 'off', - 'node/no-sync': 'off', - }, + files: ['.github/**/*.{js,mjs,mts,ts}'], + extends: [nodejs, relaxedNodeRules], }, - ], + ] as Overrides, }); From 25b6462dc924b1ecb790deef8193b489136e0105 Mon Sep 17 00:00:00 2001 From: Salah-Eddine Saakoun Date: Fri, 20 Nov 2026 11:44:47 +0100 Subject: [PATCH 2/4] chore: explain why the overrides cast is needed --- oxlint.config.mts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oxlint.config.mts b/oxlint.config.mts index 7b620e22..1af527d7 100644 --- a/oxlint.config.mts +++ b/oxlint.config.mts @@ -13,6 +13,9 @@ const relaxedNodeRules: OxlintConfig = { }, }; +// `createConfig` types `overrides` as an intersection of two array types. +// TypeScript below 5.4 rejects that when every override has an `extends` entry, +// so the array below is cast. Remove the cast once TypeScript is upgraded. type Overrides = NonNullable[0]['overrides']>; export default createConfig({ From 6d15dd2a07676485b0d8ad6dbaad3137ca148486 Mon Sep 17 00:00:00 2001 From: Salah-Eddine Saakoun Date: Fri, 20 Nov 2026 11:52:01 +0100 Subject: [PATCH 3/4] chore: inline the relaxed rules and the overrides type --- oxlint.config.mts | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/oxlint.config.mts b/oxlint.config.mts index 1af527d7..e3c8fa2c 100644 --- a/oxlint.config.mts +++ b/oxlint.config.mts @@ -3,20 +3,6 @@ import commonjs from '@metamask/oxlint-config-commonjs'; import nodejs from '@metamask/oxlint-config-nodejs'; import typescript from '@metamask/oxlint-config-typescript'; import vitest from '@metamask/oxlint-config-vitest'; -import type { OxlintConfig } from 'oxlint'; - -// Tests and workflow scripts read the environment and use synchronous APIs. -const relaxedNodeRules: OxlintConfig = { - rules: { - 'node/no-process-env': 'off', - 'node/no-sync': 'off', - }, -}; - -// `createConfig` types `overrides` as an intersection of two array types. -// TypeScript below 5.4 rejects that when every override has an `extends` entry, -// so the array below is cast. Remove the cast once TypeScript is upgraded. -type Overrides = NonNullable[0]['overrides']>; export default createConfig({ extends: [base], @@ -27,6 +13,9 @@ export default createConfig({ typeAware: true, }, + // `createConfig` types `overrides` as an intersection of two array types. + // TypeScript below 5.4 rejects that when every override has an `extends` + // entry, so the array is cast. Remove the cast once TypeScript is upgraded. overrides: [ { files: ['**/*.ts', '**/*.mts', '**/*.cts'], @@ -55,14 +44,32 @@ export default createConfig({ '.github/**/*.test.{mjs,mts}', '.github/scripts/tests/**', ], - extends: [nodejs, vitest, relaxedNodeRules], + extends: [ + nodejs, + vitest, + { + // Tests read the environment and use synchronous APIs for fixtures. + rules: { + 'node/no-process-env': 'off', + 'node/no-sync': 'off', + }, + }, + ], }, { // The workflow scripts are command line programs: they read their inputs // from the environment and can use synchronous APIs. files: ['.github/**/*.{js,mjs,mts,ts}'], - extends: [nodejs, relaxedNodeRules], + extends: [ + nodejs, + { + rules: { + 'node/no-process-env': 'off', + 'node/no-sync': 'off', + }, + }, + ], }, - ] as Overrides, + ] as NonNullable[0]['overrides']>, }); From bb28ce1f8fd5d622a89db841bd73281f0129c62e Mon Sep 17 00:00:00 2001 From: Salah-Eddine Saakoun Date: Fri, 20 Nov 2026 11:54:09 +0100 Subject: [PATCH 4/4] chore: put the relaxed rules directly in the overrides and drop the cast --- oxlint.config.mts | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/oxlint.config.mts b/oxlint.config.mts index e3c8fa2c..4409d414 100644 --- a/oxlint.config.mts +++ b/oxlint.config.mts @@ -13,9 +13,6 @@ export default createConfig({ typeAware: true, }, - // `createConfig` types `overrides` as an intersection of two array types. - // TypeScript below 5.4 rejects that when every override has an `extends` - // entry, so the array is cast. Remove the cast once TypeScript is upgraded. overrides: [ { files: ['**/*.ts', '**/*.mts', '**/*.cts'], @@ -44,32 +41,22 @@ export default createConfig({ '.github/**/*.test.{mjs,mts}', '.github/scripts/tests/**', ], - extends: [ - nodejs, - vitest, - { - // Tests read the environment and use synchronous APIs for fixtures. - rules: { - 'node/no-process-env': 'off', - 'node/no-sync': 'off', - }, - }, - ], + extends: [nodejs, vitest], + rules: { + 'node/no-process-env': 'off', + 'node/no-sync': 'off', + }, }, { // The workflow scripts are command line programs: they read their inputs // from the environment and can use synchronous APIs. files: ['.github/**/*.{js,mjs,mts,ts}'], - extends: [ - nodejs, - { - rules: { - 'node/no-process-env': 'off', - 'node/no-sync': 'off', - }, - }, - ], + extends: [nodejs], + rules: { + 'node/no-process-env': 'off', + 'node/no-sync': 'off', + }, }, - ] as NonNullable[0]['overrides']>, + ], });