Skip to content

feat: add Svelte 5 support to no-not-function-handler #1013

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

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

baseballyama
Copy link
Member

@baseballyama baseballyama commented Jan 12, 2025

I updated docs also. (on:click -> onclick)

image

Copy link

changeset-bot bot commented Jan 12, 2025

🦋 Changeset detected

Latest commit: e0b77ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-svelte Minor

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

Copy link

pkg-pr-new bot commented Jan 12, 2025

Open in Stackblitz

npm i https://pkg.pr.new/eslint-plugin-svelte@1013

commit: e0b77ba

@@ -95,6 +95,18 @@ export default createRule('no-not-function-handler', {
return;
}
verify(node.expression);
},
SvelteAttribute(node) {
if (node.key.type === 'SvelteName' && node.key.name.startsWith('on')) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if that's actually the case, but I'm worried that there might be false positives for components with properties like one, only, once, and online. 🤔

I think maybe we should ignore component attributes from the check. What do you think?

Copy link
Member Author

@baseballyama baseballyama Jan 14, 2025

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Did! 2e2b6f0

@baseballyama baseballyama force-pushed the feat/no-not-function-handler branch from f7a3556 to 1266f5b Compare January 16, 2025 00:25
@baseballyama baseballyama force-pushed the feat/no-not-function-handler branch from 2e2b6f0 to e0b77ba Compare January 16, 2025 00:32
Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

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.

2 participants