Skip to content

Add rule "prefer-const" - #133

Merged
feross merged 1 commit into
masterfrom
prefer-const
Jul 5, 2019
Merged

Add rule "prefer-const"#133
feross merged 1 commit into
masterfrom
prefer-const

Conversation

@LinusU

@LinusU LinusU commented Oct 10, 2018

Copy link
Copy Markdown
Member

Ecosystem impact:

This was referenced Oct 10, 2018
@LinusU

LinusU commented Oct 10, 2018

Copy link
Copy Markdown
Member Author

Just over an hour 😅

@brody2consult

Copy link
Copy Markdown

For new major release (13), right?

@LinusU

LinusU commented Oct 10, 2018

Copy link
Copy Markdown
Member Author

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

kyeotic commented Oct 10, 2018

Copy link
Copy Markdown

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

LinusU commented Oct 11, 2018

Copy link
Copy Markdown
Member Author

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 ☺️

@DiegoRBaquero DiegoRBaquero left a comment

Copy link
Copy Markdown

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

LinusU commented Jan 22, 2019

Copy link
Copy Markdown
Member Author

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 🐎

@feross feross left a comment

Copy link
Copy Markdown
Member

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.

5 participants