Skip to content

Commit 7fc58bb

Browse files
committed
fix(inquirer): remove constraint from ESLint
1 parent 10f2068 commit 7fc58bb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/inquirer.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export async function collectAnswers(): Promise<InquirerConfigs> {
4343
{ name: "React", value: "react" },
4444
{ name: "None", value: "none" },
4545
],
46-
when: (answers) => answers.configurations.includes("eslint"),
4746
},
4847
{
4948
type: "list",
@@ -53,7 +52,7 @@ export async function collectAnswers(): Promise<InquirerConfigs> {
5352
{ name: "JavaScript modules (import/export)", value: "esm" },
5453
{ name: "CommonJS (require/exports)", value: "commonjs" },
5554
],
56-
when: (answers) => answers.configurations.includes("eslint"),
55+
when: (answers) => !answers.configurations.includes("flow") && answers.framework === "none",
5756
validate: (input: Module, answers) => {
5857
return input === "commonjs" && answers?.framework === "react"
5958
? "You cannot use React with commonjs"
@@ -75,9 +74,8 @@ export async function collectAnswers(): Promise<InquirerConfigs> {
7574
{ name: "Browser", value: "browser" },
7675
{ name: "Node", value: "node" },
7776
],
78-
when: (answers) => answers.configurations.includes("eslint"),
7977
default: (answers: InquirerConfigs) => {
80-
if (answers.framework === "react") {
78+
if (answers.framework !== "none") {
8179
return ["browser"];
8280
}
8381

0 commit comments

Comments
 (0)