Skip to content

Commit

Permalink
feat!: Update shouldUseFlatConfig so flat config is default
Browse files Browse the repository at this point in the history
Refs # 13481
  • Loading branch information
nzakas committed Dec 20, 2023
1 parent 5aa9c49 commit d0dea8f
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lib/eslint/flat-eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -1127,19 +1127,7 @@ class FlatESLint {
* @returns {Promise<boolean>} Whether flat config should be used.
*/
async function shouldUseFlatConfig() {
switch (process.env.ESLINT_USE_FLAT_CONFIG) {
case "true":
return true;
case "false":
return false;
default:

/*
* If neither explicitly enabled nor disabled, then use the presence
* of a flat config file to determine enablement.
*/
return !!(await findFlatConfigFile(process.cwd()));
}
return (process.env.ESLINT_USE_FLAT_CONFIG !== "false");
}

//------------------------------------------------------------------------------
Expand Down

0 comments on commit d0dea8f

Please sign in to comment.