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(prefer-const): add rule #933

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mikededo
Copy link
Contributor

Adds a new rule named prefer-const which:

This PR is an updated version of #816, which did not include types. Also, some
opinionated changes were made in terms of code style, not in terms of behavior.
I found that this rule could be very useful for Svelte, and there could be many
developers who would benefit from it. At the same time, I thought that the
initial implementation was a good starting point, and that adding types and
would make the rule more robust to changes.
However, the rule should not have many changes, as how variables are handled in
JS is not likely to change.

Acknowledgement: this rule is based on the prefer-const rule from ESLint and
the initial work done by @bfanger.

Copy link

changeset-bot bot commented Nov 28, 2024

🦋 Changeset detected

Latest commit: 88d8fb5

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

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.

1 participant