Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#IOPID-1449] enable strict=true on typescript config #307

Merged
merged 6 commits into from
Mar 6, 2024

Conversation

BurnedMarshal
Copy link
Contributor

@BurnedMarshal BurnedMarshal commented Feb 26, 2024

List of Changes

Code refactory after enabling the strict=true option in tsconfig.

Motivation and Context

Having a strict=false option for Typescript transpiling can generate application and logic errors to handle properly undefined or null properties. This setting helps to prevent bugs in production.

How Has This Been Tested?

build and unit test

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Copy link

Jira Pull Request Link

This Pull Request refers to the following Jira issue IOPID-1449

@BurnedMarshal BurnedMarshal marked this pull request as ready for review February 28, 2024 13:23
@BurnedMarshal BurnedMarshal requested a review from a team as a code owner February 28, 2024 13:23
@BurnedMarshal
Copy link
Contributor Author

/azp run

Copy link

No pipelines are associated with this pull request.

GetServicePreferences/handler.ts Show resolved Hide resolved
Copy link
Contributor

@gquadrati gquadrati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments - Part 1 :)

UpdateProfile/handler.ts Outdated Show resolved Hide resolved
utils/storage.ts Show resolved Hide resolved
utils/storage.ts Show resolved Hide resolved
utils/config.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@gquadrati gquadrati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments - Part 2/2.

// NOTE: if the following check is changed make sure to pass add the name field
// to CreateProfile method which also calls this orchestrator
if (isProfileEmailChanged) {
if (isProfileEmailChanged && newProfile.email) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it's unlikely, if the email changes to undefined, could we raise an event?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean just for monitoring?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, just to ensure it never happen.

Copy link

sonarcloud bot commented Mar 4, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@gquadrati gquadrati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@BurnedMarshal BurnedMarshal merged commit b7441f0 into master Mar 6, 2024
4 checks passed
@BurnedMarshal BurnedMarshal deleted the IOPID-1449-strict-true branch March 6, 2024 11:50
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants