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

feat(lint): created local rule to use isNullish and nonNullish #2355

Closed

Conversation

AntonioVentilii-DFINITY
Copy link
Collaborator

@AntonioVentilii-DFINITY AntonioVentilii-DFINITY commented Sep 13, 2024

Motivation

We would like to enforce the usage of functions isNullish and nonNullish in the code whenever possible. As first step we look for instances of comparing a variable with undefined and/or null.

Changes

  • Created custom local lint rule for isNullish usage.
  • Created custom local lint rule for nonNullish usage.
  • Create exceptions where necessary.
  • Fix issues created by new rules.

Tests

It raised issues, correctly, and we fixed it.

@AntonioVentilii-DFINITY AntonioVentilii-DFINITY deleted the feat(lint)/custom-rule-nullish-checks branch September 27, 2024 07:46
@AntonioVentilii-DFINITY
Copy link
Collaborator Author

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.

1 participant