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: no-callback-literal ignore unknown nodes #163

Merged
merged 1 commit into from Jan 8, 2024
Merged

Conversation

aladdin-add
Copy link

fixes #162

@aladdin-add aladdin-add marked this pull request as ready for review January 8, 2024 10:20
@@ -62,7 +62,8 @@ function couldBeError(node) {
case "TaggedTemplateExpression":
case "YieldExpression":
return true // possibly an error object.

case "Literal":
return node.value == null
Copy link
Author

Choose a reason for hiding this comment

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

according its docs, the arg can be null/undefined, so I changed === to ==, to allow cases like cb(undefined)

@aladdin-add aladdin-add merged commit 5449752 into master Jan 8, 2024
17 checks passed
@aladdin-add aladdin-add deleted the issue162 branch January 8, 2024 10:44
@scagood
Copy link

scagood commented Jan 8, 2024

We should probably also merge this into 16.x and release it 🤔

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.

Bug: no-callback-literal
2 participants