Skip to content
Open
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -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
# - pnpm --filter '*with-tests*' test:unit
Expand Down
11 changes: 1 addition & 10 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -511,20 +506,16 @@ async function init() {
}

// Render ESLint config
if (needsEslint || needsOxlint) {
if (needsEslint) {
renderEslint(root, {
needsTypeScript,
needsOxlint,
needsVitest,
needsCypress,
needsCypressCT,
needsPrettier,
needsPlaywright,
})
render('config/eslint')
}

if (needsOxlint) {
render('config/oxlint')
}

Expand Down
5 changes: 1 addition & 4 deletions locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"message": "End-to-End Testing"
},
"needsEslint": {
"message": "ESLint (error prevention)"
"message": "Linter (error prevention)"
},
"needsPrettier": {
"message": "Prettier (code formatting)"
Expand All @@ -59,9 +59,6 @@
}
}
},
"needsOxlint": {
"message": "Oxlint"
},
"needsExperimental": {
"message": "Enable experimental features"
},
Expand Down
5 changes: 1 addition & 4 deletions locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand All @@ -59,9 +59,6 @@
}
}
},
"needsOxlint": {
"message": "Oxlint"
},
"needsExperimental": {
"message": "Activer les fonctionnalités expérimentales"
},
Expand Down
5 changes: 1 addition & 4 deletions locales/tr-TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"message": "Uçtan Uca Test"
},
"needsEslint": {
"message": "ESLint (hata önleme)"
"message": "Linter (hata önleme)"
},
"needsPrettier": {
"message": "Prettier (kod formatlama)"
Expand All @@ -59,9 +59,6 @@
}
}
},
"needsOxlint": {
"message": "Oxlint"
},
"needsExperimental": {
"message": "Deneysel özellikleri etkinleştir"
},
Expand Down
5 changes: 1 addition & 4 deletions locales/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"message": "端到端测试"
},
"needsEslint": {
"message": "ESLint(错误预防)"
"message": "Linter(错误预防)"
},
"needsPrettier": {
"message": "Prettier(代码格式化)"
Expand All @@ -59,9 +59,6 @@
}
}
},
"needsOxlint": {
"message": "Oxlint"
},
"needsExperimental": {
"message": "启用试验特性"
},
Expand Down
5 changes: 1 addition & 4 deletions locales/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"message": "端對端測試"
},
"needsEslint": {
"message": "ESLint(錯誤預防)"
"message": "Linter(錯誤預防)"
},
"needsPrettier": {
"message": "Prettier(程式碼格式化)"
Expand All @@ -59,9 +59,6 @@
}
}
},
"needsOxlint": {
"message": "Oxlint"
},
"needsExperimental": {
"message": "启用試驗性功能"
},
Expand Down
4 changes: 0 additions & 4 deletions scripts/snapshot.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ 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 = [
['cypress', 'playwright'],
['playwright', 'nightwatch'],
['cypress', 'nightwatch'],
['cypress', 'playwright', 'nightwatch'],
['eslint', 'eslint-with-oxlint'],
]

// The following code & comments are generated by GitHub CoPilot.
Expand Down
1 change: 0 additions & 1 deletion utils/getLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ interface Language {
}
needsExperimental: LanguageItem
needsExperimentalFeatures: LanguageItem
needsOxlint: LanguageItem
needsRolldownVite: LanguageItem
needsBareboneTemplates: LanguageItem
errors: {
Expand Down
15 changes: 4 additions & 11 deletions utils/renderEslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
})

Expand Down