Unverified Commit b6a32bb5 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

[backport] [CNA] use linter preference (#83194) (#84087)

backports https://github.com/vercel/next.js/pull/83194
parent 26d61f1e
...@@ -291,6 +291,11 @@ async function run(): Promise<void> { ...@@ -291,6 +291,11 @@ async function run(): Promise<void> {
opts.biome = preferredLinter === 'biome' opts.biome = preferredLinter === 'biome'
// No need to set noLinter flag since we check args at runtime // No need to set noLinter flag since we check args at runtime
} else { } else {
const linterIndexMap = {
eslint: 0,
biome: 1,
none: 2,
}
const { linter } = await prompts({ const { linter } = await prompts({
onState: onPromptState, onState: onPromptState,
type: 'select', type: 'select',
...@@ -313,7 +318,10 @@ async function run(): Promise<void> { ...@@ -313,7 +318,10 @@ async function run(): Promise<void> {
description: 'Skip linter configuration', description: 'Skip linter configuration',
}, },
], ],
initial: 0, initial:
linterIndexMap[
getPrefOrDefault('linter') as keyof typeof linterIndexMap
],
}) })
opts.eslint = linter === 'eslint' opts.eslint = linter === 'eslint'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment