Skip to content

Commit

Permalink
fix(@schematics/angular): add strict setting to angular.json
Browse files Browse the repository at this point in the history
With this change we add the `strict` setting to the schematics settings in the angular.json, so that when creating a strict application and/or workspace all future applications will be strict by default
  • Loading branch information
alan-agius4 authored and filipesilva committed Jun 10, 2020
1 parent f453f98 commit bb66b55
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,14 @@ function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rul
});
}

if (options.strict) {
if (!('@schematics/angular:application' in schematics)) {
schematics['@schematics/angular:application'] = {};
}

(schematics['@schematics/angular:application'] as JsonObject).strict = true;
}

const sourceRoot = join(normalize(projectRoot), 'src');
let budgets = [];
if (options.strict) {
Expand Down

0 comments on commit bb66b55

Please sign in to comment.