Skip to content

Commit

Permalink
fix(core): Should work if extends is a string
Browse files Browse the repository at this point in the history
(cherry picked from commit a00f643)
  • Loading branch information
ndcunningham authored and FrozenPandaz committed Mar 25, 2024
1 parent 5beb8d2 commit 66ae83e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/eslint/src/generators/init/init-migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ function migrateEslintFile(projectEslintPath: string, tree: Tree) {
}
// add extends
json.extends = json.extends || [];

// ensure extends is an array
if (typeof json.extends === 'string') {
json.extends = [json.extends];
}

const pathToRootConfig = `${offsetFromRoot(
dirname(projectEslintPath)
)}${baseFile}`;
Expand Down

0 comments on commit 66ae83e

Please sign in to comment.