equinor / esv-intersection

A reusable component to create intersection visualizations for wells
https://equinor.github.io/esv-intersection/storybook/latest
MIT License
12 stars 7 forks source link

chore: enable Typescript's strict mode #648

Closed venikx closed 1 year ago

venikx commented 1 year ago

Why enabling strict mode?

How did I go about it?

Why hide/escape some of the errors with !

The strict mode setting reported over 1500 errors, which if I'd want to properly fix in one PR would be a monstrous task. Using ! I can effectively leave the code exactly as it is, while keeping the strict mode on by default. In future contributions it's encouraged to remove these ! and fixing the whole type chain in a proper fashion, so essentially (just like today) in the areas where ! is being used there's potential bug looming. Fixing these bugs be done incrementally.

Currently there's 297 locations where such escape hatches are being used and this number should go down, as relying on ! is not recommended, because essentially these are locations for "potential" bugs, and if they are correct then the types or interfaces needs changing as well.

changeset-bot[bot] commented 1 year ago

đŸ¦‹ Changeset detected

Latest commit: 819b910167abad64117e51b6c8916c68a0132fe4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------------------- | ----- | | @equinor/esv-intersection | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

venikx commented 1 year ago

@HavardNJ @nilsml Do you think this should be a breaking change?