Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bb66b55

Browse files
alan-agius4filipesilva
authored andcommittedJun 10, 2020
fix(@schematics/angular): add strict setting to angular.json
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
1 parent f453f98 commit bb66b55

File tree

1 file changed

+8
-0
lines changed
  • packages/schematics/angular/application

1 file changed

+8
-0
lines changed
 

‎packages/schematics/angular/application/index.ts

+8
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rul
179179
});
180180
}
181181

182+
if (options.strict) {
183+
if (!('@schematics/angular:application' in schematics)) {
184+
schematics['@schematics/angular:application'] = {};
185+
}
186+
187+
(schematics['@schematics/angular:application'] as JsonObject).strict = true;
188+
}
189+
182190
const sourceRoot = join(normalize(projectRoot), 'src');
183191
let budgets = [];
184192
if (options.strict) {

0 commit comments

Comments
 (0)
Please sign in to comment.