HSLdevcom / digitransit-ui

Digitransit UI ("Reittiopas.fi")
https://www.reittiopas.fi/
Other
239 stars 132 forks source link

Refactor shapes used for proptype definitions #4973

Closed vesameskanen closed 6 months ago

vesameskanen commented 6 months ago

Consistent use of custom shapes:

This PR removes several hundreds of linter proptype warnings. 139 left to fix.

Note: use of shared shape definitions means that some 'isRequired' attributes must be removed. For example, not all Leg properies are present in every context. So, debugger will give less runtime warnigs from faulty data. On positive side, code is much cleaner, shorter and easier to maintain.