style: lint (#36580)

PR Close #36580
This commit is contained in:
Greg Magolan 2020-04-11 09:34:23 -07:00 committed by atscott
parent 58e175318c
commit 29122c518b
1 changed files with 5 additions and 4 deletions

View File

@ -9,10 +9,10 @@
*/
import {JsonAstObject, parseJsonAst} from '@angular-devkit/core';
import {Rule, SchematicContext, SchematicsException, Tree, apply, applyTemplates, chain, mergeWith, url} from '@angular-devkit/schematics';
import {apply, applyTemplates, chain, mergeWith, Rule, SchematicContext, SchematicsException, Tree, url} from '@angular-devkit/schematics';
import {NodePackageInstallTask} from '@angular-devkit/schematics/tasks';
import {getWorkspace, getWorkspacePath} from '@schematics/angular/utility/config';
import {NodeDependencyType, addPackageJsonDependency, getPackageJsonDependency, removePackageJsonDependency} from '@schematics/angular/utility/dependencies';
import {addPackageJsonDependency, getPackageJsonDependency, NodeDependencyType, removePackageJsonDependency} from '@schematics/angular/utility/dependencies';
import {findPropertyInAstObject, insertPropertyInAstObjectInOrder} from '@schematics/angular/utility/json-utils';
import {validateProjectName} from '@schematics/angular/utility/validation';
@ -137,7 +137,7 @@ function updateGitignore() {
*/
function updateAngularJsonToUseBazelBuilder(options: Schema): Rule {
return (host: Tree) => {
const name = options.name !;
const name = options.name!;
const workspacePath = getWorkspacePath(host);
if (!workspacePath) {
throw new Error('Could not find angular.json');
@ -235,7 +235,8 @@ function backupAngularJson(): Rule {
return;
}
host.create(
`${workspacePath}.bak`, '// This is a backup file of the original angular.json. ' +
`${workspacePath}.bak`,
'// This is a backup file of the original angular.json. ' +
'This file is needed in case you want to revert to the workflow without Bazel.\n\n' +
host.read(workspacePath));
};