From 76e72134ebfad120c3cdece0538196f9e370e1f6 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 12 Dec 2025 15:30:09 +0900 Subject: [PATCH 1/3] feat: always include Oxlint with ESLint --- index.ts | 11 +---------- locales/en-US.json | 5 +---- locales/fr-FR.json | 5 +---- locales/tr-TR.json | 5 +---- locales/zh-Hans.json | 5 +---- locales/zh-Hant.json | 5 +---- scripts/snapshot.mjs | 4 ---- utils/getLanguage.ts | 1 - utils/renderEslint.ts | 15 ++++----------- 9 files changed, 10 insertions(+), 46 deletions(-) diff --git a/index.ts b/index.ts index 4d77d0904..d5d8fe092 100755 --- a/index.ts +++ b/index.ts @@ -83,10 +83,6 @@ const FEATURE_OPTIONS = [ }, ] as const const EXPERIMENTAL_FEATURE_OPTIONS = [ - { - value: 'oxlint', - label: language.needsOxlint.message, - }, { value: 'rolldown-vite', label: language.needsRolldownVite.message, @@ -378,7 +374,6 @@ async function init() { const needsEslint = argv.eslint || argv['eslint-with-prettier'] || features.includes('eslint') const needsPrettier = argv.prettier || argv['eslint-with-prettier'] || features.includes('prettier') - const needsOxlint = experimentFeatures.includes('oxlint') || argv['oxlint'] const needsRolldownVite = experimentFeatures.includes('rolldown-vite') || argv['rolldown-vite'] const { e2eFramework } = result @@ -511,10 +506,9 @@ async function init() { } // Render ESLint config - if (needsEslint || needsOxlint) { + if (needsEslint) { renderEslint(root, { needsTypeScript, - needsOxlint, needsVitest, needsCypress, needsCypressCT, @@ -522,9 +516,6 @@ async function init() { needsPlaywright, }) render('config/eslint') - } - - if (needsOxlint) { render('config/oxlint') } diff --git a/locales/en-US.json b/locales/en-US.json index 10a91068f..0ed8e5802 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -37,7 +37,7 @@ "message": "End-to-End Testing" }, "needsEslint": { - "message": "ESLint (error prevention)" + "message": "Linter (error prevention)" }, "needsPrettier": { "message": "Prettier (code formatting)" @@ -59,9 +59,6 @@ } } }, - "needsOxlint": { - "message": "Oxlint" - }, "needsExperimental": { "message": "Enable experimental features" }, diff --git a/locales/fr-FR.json b/locales/fr-FR.json index 1e2ff6895..a0353cd5e 100644 --- a/locales/fr-FR.json +++ b/locales/fr-FR.json @@ -37,7 +37,7 @@ "message": "Tests de bout en bout" }, "needsEslint": { - "message": "ESLint (prévention des erreurs)" + "message": "Linter (prévention des erreurs)" }, "needsPrettier": { "message": "Prettier (formatage du code)" @@ -59,9 +59,6 @@ } } }, - "needsOxlint": { - "message": "Oxlint" - }, "needsExperimental": { "message": "Activer les fonctionnalités expérimentales" }, diff --git a/locales/tr-TR.json b/locales/tr-TR.json index 550cdcedd..93e01810d 100644 --- a/locales/tr-TR.json +++ b/locales/tr-TR.json @@ -37,7 +37,7 @@ "message": "Uçtan Uca Test" }, "needsEslint": { - "message": "ESLint (hata önleme)" + "message": "Linter (hata önleme)" }, "needsPrettier": { "message": "Prettier (kod formatlama)" @@ -59,9 +59,6 @@ } } }, - "needsOxlint": { - "message": "Oxlint" - }, "needsExperimental": { "message": "Deneysel özellikleri etkinleştir" }, diff --git a/locales/zh-Hans.json b/locales/zh-Hans.json index 3f46cf5d5..b9677d34c 100644 --- a/locales/zh-Hans.json +++ b/locales/zh-Hans.json @@ -37,7 +37,7 @@ "message": "端到端测试" }, "needsEslint": { - "message": "ESLint(错误预防)" + "message": "Linter(错误预防)" }, "needsPrettier": { "message": "Prettier(代码格式化)" @@ -59,9 +59,6 @@ } } }, - "needsOxlint": { - "message": "Oxlint" - }, "needsExperimental": { "message": "启用试验特性" }, diff --git a/locales/zh-Hant.json b/locales/zh-Hant.json index 98cc63b2d..16ad10b0d 100644 --- a/locales/zh-Hant.json +++ b/locales/zh-Hant.json @@ -37,7 +37,7 @@ "message": "端對端測試" }, "needsEslint": { - "message": "ESLint(錯誤預防)" + "message": "Linter(錯誤預防)" }, "needsPrettier": { "message": "Prettier(程式碼格式化)" @@ -59,9 +59,6 @@ } } }, - "needsOxlint": { - "message": "Oxlint" - }, "needsExperimental": { "message": "启用試驗性功能" }, diff --git a/scripts/snapshot.mjs b/scripts/snapshot.mjs index 548181578..faafc80a3 100644 --- a/scripts/snapshot.mjs +++ b/scripts/snapshot.mjs @@ -18,9 +18,6 @@ const featureFlags = [ 'playwright', 'nightwatch', 'eslint', - // Skipped oxlint for now as too many files in playground - // caused GitHub Actions to fail with (EMFILE: too many open files) - // 'eslint-with-oxlint', 'prettier', ] const featureFlagsDenylist = [ @@ -28,7 +25,6 @@ const featureFlagsDenylist = [ ['playwright', 'nightwatch'], ['cypress', 'nightwatch'], ['cypress', 'playwright', 'nightwatch'], - ['eslint', 'eslint-with-oxlint'], ] // The following code & comments are generated by GitHub CoPilot. diff --git a/utils/getLanguage.ts b/utils/getLanguage.ts index 7144841a2..d1aa4e521 100644 --- a/utils/getLanguage.ts +++ b/utils/getLanguage.ts @@ -38,7 +38,6 @@ interface Language { } needsExperimental: LanguageItem needsExperimentalFeatures: LanguageItem - needsOxlint: LanguageItem needsRolldownVite: LanguageItem needsBareboneTemplates: LanguageItem errors: { diff --git a/utils/renderEslint.ts b/utils/renderEslint.ts index 823543851..035c4e09a 100644 --- a/utils/renderEslint.ts +++ b/utils/renderEslint.ts @@ -11,15 +11,7 @@ const eslintDeps = eslintTemplatePackage.devDependencies export default function renderEslint( rootDir, - { - needsTypeScript, - needsVitest, - needsCypress, - needsCypressCT, - needsOxlint, - needsPrettier, - needsPlaywright, - }, + { needsTypeScript, needsVitest, needsCypress, needsCypressCT, needsPrettier, needsPlaywright }, ) { const additionalConfigs = getAdditionalConfigs({ needsTypeScript, @@ -32,10 +24,11 @@ export default function renderEslint( const { pkg, files } = createESLintConfig({ styleGuide: 'default', hasTypeScript: needsTypeScript, - needsOxlint, - // Theoretically, we could add Prettier without requring ESLint. + needsOxlint: true, + // Theoretically, we could add Prettier without requiring ESLint. // But it doesn't seem to be a good practice, so we just let createESLintConfig handle it. needsPrettier, + needsOxfmt: false, additionalConfigs, }) From b992814c2503b4715096e9e70386b949edef80b3 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 12 Dec 2025 16:20:09 +0900 Subject: [PATCH 2/3] ci: test both lint:* commands; no easy way to test the `run-s` script --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02d667355..4d9176d1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,8 @@ jobs: - pnpm --filter '!*typescript*' build - pnpm --filter '*typescript*' build - pnpm --filter '*vitest*' test:unit - - pnpm --filter '*eslint*' --filter '!*nightwatch*' lint --no-fix --max-warnings=0 + - pnpm --filter '*eslint*' --filter '!*nightwatch*' lint:oxlint --max-warnings=0 + - pnpm --filter '*eslint*' --filter '!*nightwatch*' lint:eslint --no-fix --max-warnings=0 - pnpm --filter '*prettier*' format # FIXME: it's failing now # - pnpm --filter '*with-tests*' test:unit From 2b566fbb6b0fe0e7a933494bccee22fa71861d72 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 12 Dec 2025 16:39:03 +0900 Subject: [PATCH 3/3] ci: allow empty file --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d9176d1e..39e2e6404 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: - pnpm --filter '!*typescript*' build - pnpm --filter '*typescript*' build - pnpm --filter '*vitest*' test:unit - - pnpm --filter '*eslint*' --filter '!*nightwatch*' lint:oxlint --max-warnings=0 + - pnpm --filter '*eslint*' --filter '!*nightwatch*' lint:oxlint --max-warnings=0 -A no-empty-file - pnpm --filter '*eslint*' --filter '!*nightwatch*' lint:eslint --no-fix --max-warnings=0 - pnpm --filter '*prettier*' format # FIXME: it's failing now