Skip to content

Conversation

@jusguy
Copy link
Contributor

@jusguy jusguy commented Dec 20, 2018

In order to comply with the new proposed standard rule no-case-declaration:

standard/eslint-config-standard#137

Copy link
Member

@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.

I would prefer using blocks with brackets as shown in the correct example (https://eslint.org/docs/rules/no-case-declarations). Else now the variables are even shared on an upper scope, defeating the purpose of the rule.

@jusguy
Copy link
Contributor Author

jusguy commented Dec 20, 2018

Agreed @DiegoRBaquero, I have changed it.

@jusguy jusguy changed the title Remove declarations from inside switch statements Wrap lexical declarations inside switch cases Dec 20, 2018
@DiegoRBaquero DiegoRBaquero merged commit 19a363d into webtorrent:master Dec 20, 2018
@jusguy
Copy link
Contributor Author

jusguy commented Dec 20, 2018

❤️ Thanks for the fast review.

@jusguy jusguy deleted the fix-no-case-declarations branch December 20, 2018 20:19
@DiegoRBaquero
Copy link
Member

Thank you for the PR ! :D

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.

2 participants