Skip to content

[Feature request]: Add StrictNullCheck constraint to configuration #645

@Pivouane

Description

@Pivouane

Preflight Checklist

Request type

Request for enhancement of a component

Functionality

Description

The goal is to add the "strictNullChecks": true to the config file and get it to work fine with every part of the project.

"useDefineForClassFields": false,
"strictNullChecks": true

To do so, we can work on mutiple branches focusing on a specific directory and get the files in it to comply with the rule, one by one.

Using validate:ts we can check only the directory we're interested into :

Example

npm run validate:ts -- --strictNullChecks src/app/utils/*.ts

This is a suggestion to make the code base more safe. Currently, many issues can happen because of this.

This needs to fix many many things in the code (see CI or run npm run build) before this can be merged (CI ticks green), the config can be enabled only on some folders first to split the work in smaller pieces.

Issues

Checklist

  • This PR contains a description of the changes I'm making
  • I've read the Contribution Guidelines
  • I documented any high-level concepts I'm introducing in documentation/
  • CI is currently green and this is ready for review

Link to design proposal file

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Awaiting Validation

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions