-
-
Notifications
You must be signed in to change notification settings - Fork 48
feat: implement stores-no-async
#225
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: implement stores-no-async
#225
Conversation
🦋 Changeset detectedLatest commit: 0b8b4ce The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR!
I think it works mostly fine already, but I have some change requests to address some edge cases.
src/rules/no-store-async.ts
Outdated
if (name !== "writable" && name !== "readable" && name !== "derived") | ||
return | ||
const [, fn] = node.arguments | ||
if (fn.type !== "ArrowFunctionExpression" || !fn.async) return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should check if the argument exists.
if (fn.type !== "ArrowFunctionExpression" || !fn.async) return | |
if (!fn || fn.type !== "ArrowFunctionExpression" || !fn.async) return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed! Sorry for that!
Thank you for your review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything strange. LGTM! 🍺
Thank you for your contribution! |
Related to: #198 (
stores-no-async
)This is the first ESLint rule I have written.
(So I'm sorry if I have a wrong understanding.)
I would be very grateful if you would review it.