Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4738

Resolve type errors after enabling `strictNullChecks` in console/frontend

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • None
    • None

      Enable `strictNullChecks` in the console/frontend and fix all build errors. This is mandatory for the i18next >22 version upgrade and might be required for other console dependencies in the future. And in addition, this will further help prevent unexpected runtime errors caused by null or undefined values.

      Total Errors at the start of Spike: 13,448

      Progress so far
      Remaining errors about: 10,500 

      A.C.

      • Create an inventory of effected static plugins.
      • Reach out to the owners to carry out the fix (TBD - lets discuss this item once we have a clear picture how to move forward)
      • This command can be used to get the total number of TypeScript errors when `strictNullChecks` is enabled:

                  `npx tsc --noEmit | wc -l`

      List number of errors for every file in the current directory: npx tsc --noEmit

       

          1.
          Enable strickNullCheck for package/console-app/src/actions Sub-task Closed Undefined Unassigned
          2.
          Enable strictNullChecks: true for frontend/components Sub-task Closed Undefined Unassigned
          3.
          Enable strictNullChecks: true for frontend/dev-console Sub-task Closed Undefined Unassigned
          4.
          Enable strictNullChecks: true for frontend/operator-lifecycle-manager and frontend/operator-lifecycle-manager-v1 Sub-task Closed Undefined Unassigned
          5.
          Enable strictNullChecks: true for frontend/knative-plugin Sub-task Closed Undefined Unassigned
          6.
          Enable strictNullChecks: true for frontend/insights-plugin and frontend/helm-plugin Sub-task Closed Undefined Unassigned
          7.
          Enable strickNullCheck for packages/console-app/src/components/{access-modes | admission-webhook-warnings | packages/console-app/src/components/cluster-configuration } Sub-task Closed Undefined Unassigned
          8.
          Enable strickNullCheck for packages/console-app/src/components/{packages/console-app/src/components/console-operator | dashboards-page | detect-namespace} Sub-task Closed Undefined Unassigned
          9.
          packages/console-app/src/components/{packages/console-app/src/components/detect-language| detect-perspective | favorite | flags | guided-tour} Sub-task Closed Undefined Unassigned
          10.
          packages/console-app/src/components/{packages/console-app/src/components/ lightspeed | modals | nav | file-upload} Sub-task Closed Undefined Unassigned
          11.
          Enable strickNullCheck for packages/console-app/src/components/{packages/console-app/src/components/ nodes | oauth-config | PDB} Sub-task Closed Undefined Unassigned
          12.
          Enable strickNullCheck for packages/console-app/src/components/{packages/console-app/src/components/resource-quota | quick-starts | tour | tabs | vpa | storage} Sub-task Closed Undefined Unassigned
          13.
          packages/console-app/src/components/{packages/console-app/src/components/volume-modes | volume-snapshots |user-preferences } Sub-task Closed Undefined Unassigned
          14.
          Enable strictNullChecks: true for frontend/components Sub-task Closed Undefined Unassigned
          15.
          Enable strictNullChecks: true for frontend/dev-console Sub-task Closed Undefined Unassigned
          16.
          Enable strictNullChecks: true for frontend/operator-lifecycle-manager and frontend/operator-lifecycle-manager-v1 Sub-task Closed Undefined Unassigned
          17.
          Enable strictNullChecks: true for frontend/knative-plugin Sub-task Closed Undefined Unassigned
          18.
          Enable strictNullChecks: true for frontend/insights-plugin and frontend/helm-plugin Sub-task Closed Undefined Unassigned
          19.
          Enable strickNullCheck for packages/console-app/src/components/{packages/console-app/src/components/ nodes | oauth-config | PDB} Sub-task Closed Undefined Unassigned

              Unassigned Unassigned
              rh-ee-kragarwa Krish Agarwal (Inactive)
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: