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

fix(polyfill): correctly handle flag when its equal 0 #20953

Merged
merged 4 commits into from
Oct 22, 2023

Conversation

sigmaSd
Copy link
Contributor

@sigmaSd sigmaSd commented Oct 22, 2023

fix #20910

I guess the code must have many hidden issues like this, can we have a lint that obligate using comparison to undefined so if (var !== undefined) instead of if (!var) ?

  • todo tests

@sigmaSd sigmaSd changed the title fix(node_open_shim): correctly handle flag when its equal 0 fix(polyfill): correctly handle flag when its equal 0 Oct 22, 2023
@sigmaSd
Copy link
Contributor Author

sigmaSd commented Oct 22, 2023

I guess https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md would've been great but its probably also blocked by type aware lints

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@bartlomieju bartlomieju enabled auto-merge (squash) October 22, 2023 07:54
@bartlomieju bartlomieju merged commit 9f9c3d9 into denoland:main Oct 22, 2023
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.

node comapt: Deno.openSync shim seems to fail
2 participants