diia-open-source / be-pkg-utils

European Union Public License 1.2
14 stars 10 forks source link

Hardcoded a lot in getDriverLicenseSharingRenderData #17

Open tshemsedinov opened 4 months ago

tshemsedinov commented 4 months ago
  1. Multiple code duplication, use intermediate variables to reduce code
  2. All text messages should use internationalization as in other part of this code, but you have no access to them from here, that's due to bad code structure, use injection of pass it somehow
  3. magic numbers detected https://github.com/diia-open-source/be-pkg-utils/blob/e969374fb769e59ab6bbdb709caeba0199e14a8c/src/pdfUtils.ts#L81-L185

We have same problems in all functions in this file https://github.com/diia-open-source/be-pkg-utils/blob/main/src/pdfUtils.ts