Skip to content

Commit

Permalink
fix(misc): await async function invocations
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed Jan 24, 2024
1 parent 096cefb commit 0bed5fe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export async function migrateFromAngularCli(
createRootKarmaConfig(tree);
}
if (workspaceRootFileTypesInfo.eslint) {
updateRootEsLintConfig(tree, eslintConfig, options.unitTestRunner);
await updateRootEsLintConfig(tree, eslintConfig, options.unitTestRunner);
cleanupEsLintPackages(tree);
}

Expand Down
8 changes: 4 additions & 4 deletions packages/angular/src/generators/ng-add/utilities/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
updateNxJson,
writeJson,
} from '@nx/devkit';
import { Linter, lintInitGenerator } from '@nx/eslint';
import { lintInitGenerator } from '@nx/eslint';
import { setupRootEsLint } from '@nx/eslint/src/generators/lint-project/setup-root-eslint';
import {
getRootTsConfigPathInTree,
Expand Down Expand Up @@ -185,12 +185,12 @@ export function updatePackageJson(tree: Tree): void {
});
}

export function updateRootEsLintConfig(
export async function updateRootEsLintConfig(
tree: Tree,
existingEsLintConfig: any | undefined,
unitTestRunner?: string
): void {
lintInitGenerator(tree, {});
): Promise<void> {
await lintInitGenerator(tree, {});

if (!existingEsLintConfig) {
// There was no eslint config in the root, so we set it up and use it as-is
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint/src/generators/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async function initEsLint(
}

if (options.updatePackageScripts) {
updatePackageScripts(tree, createNodes);
await updatePackageScripts(tree, createNodes);
}

return runTasksInSerial(...tasks);
Expand Down

0 comments on commit 0bed5fe

Please sign in to comment.