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

Remove dummy if statements #77

Merged
merged 1 commit into from
Oct 26, 2024
Merged

Remove dummy if statements #77

merged 1 commit into from
Oct 26, 2024

Conversation

shadowspawn
Copy link
Contributor

Pull Request

I was using an if statement for a block in the type tests like:

if ('test description') {
   ....
   expectedType(...);
}

to mirror the Jest test layout:

it ('test description') {
   ....
   expect(...);
}

Problem

TypeScript started complaining about the truthy value (string) used for the if expression.

Solution

Move the test description to a comment. Keep the blocks so have scoped local variables.

@shadowspawn shadowspawn merged commit 5a90c8f into develop Oct 26, 2024
18 checks passed
@shadowspawn shadowspawn deleted the lint-truthy-if branch October 26, 2024 23:52
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.

2 participants