ovh / manager

OVHcloud Control Panel
https://ovh.github.io/manager/
BSD 3-Clause "New" or "Revised" License
213 stars 98 forks source link

[manager-components]: Typescript `strict` mode is not enabled #12662

Open fredericvilcot opened 2 months ago

fredericvilcot commented 2 months ago

On which entity, you would like to report a bug?

The whole package

Description

In the tsconfig.json file, there is no strict mode enabled, and in a lesser extent the strictNullChecks mode. There are two main issues with that:

I'll suggest to enable the strict mode (or at least the strictNullCheck mode) in the tsconfig.json file and to fix all related TypeErrors so that we improve global performance and limit bugs.

Steps to reproduce

  1. yarn install
  2. add "strict: true" to tsconfig.json
  3. yarn build

Browser

Firefox

Operating System

Additional Information

Capture d’écran 2024-08-07 à 11 01 36 Capture d’écran 2024-08-07 à 11 01 56

aboungnaseng-ovhcloud commented 2 months ago

I have seen the issues with Frederic, if we want to switch strict mode option in tsconfig file of the manager component lib, we have to correct all the typescript errors in the lib.

After that, react apps that import manager component lib can switch to strict mode too.