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

Add rule "prefer-const" #133

Merged
merged 1 commit into from Jul 5, 2019
Merged

Add rule "prefer-const" #133

merged 1 commit into from Jul 5, 2019

Conversation

LinusU
Copy link
Member

@LinusU LinusU commented Oct 10, 2018

Ecosystem impact:

This was referenced Oct 10, 2018
@LinusU
Copy link
Member Author

LinusU commented Oct 10, 2018

Just over an hour 😅

@brodybits
Copy link

For new major release (13), right?

@LinusU
Copy link
Member Author

LinusU commented Oct 10, 2018

Yes 👍

Rule addition is basically always a breaking change in the eyes of Standard 👌

@LinusU LinusU requested a review from feross October 10, 2018 19:28
@LinusU LinusU self-assigned this Oct 10, 2018
@LinusU LinusU added this to the Standard 13 milestone Oct 10, 2018
@kyeotic
Copy link

kyeotic commented Oct 10, 2018

I strongly dislike this rule, as it removes my ability to signal to future readers of code that, while a variable is not mutated currently, mutation is perfectly acceptable.

@LinusU
Copy link
Member Author

LinusU commented Oct 11, 2018

For anyone new coming in, there was some discussion around that argument here: standard/standard#159 (comment)

I personally think that in practice that almost never happens, and that you can always use an eslint-disable comment to allow it in those rare cases, which also makes the future intent even more clear since there will be a comment next to it ☺️

Copy link

@DiegoRBaquero DiegoRBaquero left a comment

Choose a reason for hiding this comment

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

Agree. Something I need, would have saved me from a huge in-production mistake.

@LinusU
Copy link
Member Author

LinusU commented Jan 22, 2019

ping @feross, basically all projects are fixed upstream, what do you think about merging this? ☺️

would love to see this and #131 make it into a new release 🐎

Copy link
Member

@feross feross left a comment

Choose a reason for hiding this comment

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

LGTM. Let's ship it in standard 13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants