Skip to content

schematics: verify that generated code passes CLI's stricter compiler flags #17135

Closed
@Splaktar

Description

@Splaktar

Reproduction

PR angular/angular-cli#14905 introduces a new strict option to the Angular CLI. This option is currently false by default, but there are plans to make it true in version 9 or 10.

    "noImplicitAny": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noFallthroughCasesInSwitch": true,
    "strictNullChecks": true,

Expected Behavior

We need to make sure that all of the code generated by our Schematics will compile with these new flags.

We already use these flags for building the library source and examples.

PR angular/material.angular.io#631 adds these compiler flags for material.angular.io builds as well.

Related Issues

I'm not sure if this is something that we can do in integration tests (#16479) or not. But it seems possible and would be needed to avoid introducing regressions over time.

#13329 tracks making the library code follow even stricter checks (--strictPropertyInitialization).

#16028 relates to stricter template checks in Ivy.

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions