Skip to content

Use let or const instead of var #109

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

Merged
merged 1 commit into from
Dec 29, 2017
Merged

Conversation

czosel
Copy link
Collaborator

@czosel czosel commented Dec 28, 2017

No description provided.

@ichiriac ichiriac self-requested a review December 28, 2017 23:50
Copy link
Member

@ichiriac ichiriac left a comment

Choose a reason for hiding this comment

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

amazing work ! I owe you one dude ;)

* @extends {Expression}
* @property {Array|Expression} what
* @see https://wiki.php.net/rfc/argument_unpacking
*/
var Variadic = Expr.extends(function Variadic(what, location) {
const variadic = Expr.extends(function variadic(what, location) {
Copy link
Member

Choose a reason for hiding this comment

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

First letter of the class name should be in upper case in order to avoid confusion with functions

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

of course, this was a search/replace mistake 😉

@@ -204,28 +204,28 @@ module.exports = {
case this.tok.T_NEW:
return this.next().read_new_expr();

case this.tok.T_ISSET:
case this.tok.T_ISSET: {
Copy link
Member

Choose a reason for hiding this comment

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

why surrounding with { ... } ? It it a linter directive or is it better ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, eslint complains when you put let/const inside case. see https://eslint.org/docs/rules/no-case-declarations

@ichiriac ichiriac merged commit fca19d6 into glayzzle:master Dec 29, 2017
@czosel
Copy link
Collaborator Author

czosel commented Dec 29, 2017

😄 Thanks for the invite!

@ichiriac
Copy link
Member

You are very welcome my friend, I'm glad for your help 👍

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