Skip to content

feat: add svelte/prefer-destructured-store-props rule #270

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 15 commits into from
Oct 6, 2022

Conversation

ota-meshi
Copy link
Member

This PR is a follow up for #208.

Changed the rule to only warn about store property access in templates.

close #208

@changeset-bot
Copy link

changeset-bot bot commented Oct 5, 2022

🦋 Changeset detected

Latest commit: 5de72f9

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 5, 2022

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.

@ota-meshi ota-meshi requested review from JounQin and tivac October 5, 2022 08:57
Copy link
Collaborator

@tivac tivac left a comment

Choose a reason for hiding this comment

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

Very thorough, wow. I don't see any red flags.

object: TSESTree.Identifier & { name: string }
}

const keywords = new Set([
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would something like esutils be useful here since it's less likely to drift out of sync?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for checking this PR. I think it would be great to replace with esutils as you suggested! I will change this PR.

@ota-meshi ota-meshi merged commit dc60b36 into main Oct 6, 2022
@ota-meshi ota-meshi deleted the prefer-destructured-store-props branch October 6, 2022 00:28
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.

3 participants