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

update best-practices config to prevent parameter object manipulation #627

Merged
merged 3 commits into from
Dec 17, 2015

Conversation

trshafer
Copy link
Contributor

added good/bad examples of parameter mutation to the readme

addresses #626

added good/bad examples of parameter mutation to the readme
@trshafer trshafer force-pushed the no-param-reassign-with-props branch from b20f0b5 to 2589c67 Compare December 16, 2015 23:43
@trshafer
Copy link
Contributor Author

just force pushed over my previous commit to change the no-param-reassign value to use single quotes.


```javascript
// bad
function f(a){
Copy link
Collaborator

Choose a reason for hiding this comment

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

please change ){ to ) { throughout

add link to no-param-reassign rule documentation
@trshafer
Copy link
Contributor Author

Updated the examples and rules. I can squash the commits when ready.

// bad
function f1(a) {
a = 1;
}

Choose a reason for hiding this comment

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

Add new line after end of function.

ljharb added a commit that referenced this pull request Dec 17, 2015
[eslint config] [breaking] update best-practices config to prevent parameter object manipulation
@ljharb ljharb merged commit 88484ce into airbnb:master Dec 17, 2015
@trshafer trshafer deleted the no-param-reassign-with-props branch December 17, 2015 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants