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(no-sync): Add ignores option #364

Closed
wants to merge 2 commits into from

Conversation

scagood
Copy link

@scagood scagood commented Oct 18, 2024

I am still on the fence about #354

As one part of me thinks that we should be specific to the node apis only.
The other part of me thinks that we should make all possibly sync function calls as bad in the node environment 🤔


I am slowly leaning towards using the ReferenceTracker from eslint-utils to only mark call expressions from node apis.

@scagood scagood changed the title fix(no-sync): Only error "CallExpressions" @scagood feat(no-sync): Add ignores option Oct 18, 2024
@scagood scagood requested review from aladdin-add and a team October 18, 2024 15:26
@scagood scagood changed the title @scagood feat(no-sync): Add ignores option feat(no-sync): Add ignores option Oct 18, 2024
@scagood scagood marked this pull request as ready for review October 25, 2024 15:55
@aladdin-add
Copy link

sorry for the lateness, will review it asap! :)

@aladdin-add
Copy link

aladdin-add commented Nov 15, 2024

I am slowly leaning towards using the ReferenceTracker from eslint-utils to only mark call expressions from node apis.

the rule was ported from eslint core (deprecated since eslint v7). This is how it was first developed, and I didn't find a relevant discussion: eslint/eslint@37cf3d8

I'm fine to just checking node.js apis, or at the very least, it can just ignore user-defined functions:

var fooSync = function () {}; // do not reprot!

@scagood
Copy link
Author

scagood commented Nov 18, 2024

Superceeded by #386

@scagood scagood closed this Nov 18, 2024
@scagood scagood deleted the no-sync-issues branch November 18, 2024 10:31
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: n/no-sync incorrectly applies to method definitions Bug: no-sync fail positive
2 participants