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
  • Loading branch information
ndcunningham authored and meeroslav committed Mar 20, 2024
1 parent 64b2396 commit a00f643
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 a00f643

Please sign in to comment.