-
-
Notifications
You must be signed in to change notification settings - Fork 38
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: Added the experimental-require-strict-events
rule
#365
Conversation
🦋 Changeset detectedLatest commit: 99477b9 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. |
…equire-strict-events
…e 111556Events interface
Hi @ota-meshi, there are some lint issues but I think they're unrelated to the PR... |
I think merging or rebasing the current main branch will probably solve it. Could you try it? |
No luck :( |
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 made two comments. Could you please check them out?
} | ||
}, | ||
"Program:exit"() { | ||
if (isTs && !hasAttribute && !hasInterface) { |
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.
Do you think the strictEvents
attribute should be given even if createEventDispatcher
or on:click
are not used?
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.
Yes, I do - the strictEvents
attributes makes all "callers" of the component (i.e. components that contain it) have their on:something
handlers checked as well - so even if a component has no events, the strictEvents
attribute brings a benefit in that the callers will error if they try to add a handler to a non-existent event.
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!
Great, I'll get #368 ready :) |
Closes #345