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

Fix "default is a reserved keyword" error no-named-default tests #757

Merged
merged 2 commits into from
Mar 2, 2017
Merged

Fix "default is a reserved keyword" error no-named-default tests #757

merged 2 commits into from
Mar 2, 2017

Conversation

gmathieu
Copy link
Contributor

@gmathieu gmathieu commented Mar 1, 2017

@gmathieu
Copy link
Contributor Author

gmathieu commented Mar 1, 2017

Anyone know how to restart travis-ci? It's clearly hung.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.915% when pulling e0e9149 on gmathieu:fix-default-keyword into b5a962f on benmosher:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.915% when pulling e0e9149 on gmathieu:fix-default-keyword into b5a962f on benmosher:master.

@coveralls
Copy link

coveralls commented Mar 1, 2017

Coverage Status

Coverage remained the same at 94.915% when pulling e0e9149 on gmathieu:fix-default-keyword into b5a962f on benmosher:master.

@ljharb
Copy link
Member

ljharb commented Mar 1, 2017

I'm glad we figured this out - but I think if the parsing error is per-spec, that we should instead fix the code.

@gmathieu
Copy link
Contributor Author

gmathieu commented Mar 1, 2017

I would recommend removing this test (possibly the rule?) since most environments throw an exception when assign variables to default.

Safari 10.0.3 (12602.4.8)

var { default } = { default: 'foo' }
SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'default'.

Chrome 56.0.2924.87

var { default } = { default: 'foo' }
VM11560:1 Uncaught SyntaxError: Unexpected token }
var default = 'foo'
VM11582:1 Uncaught SyntaxError: Unexpected token default

Firefox 51.0.1

var { default } = { default: 'foo' }
SyntaxError: default is a reserved identifier

Node 6.9.1

var { default } = { default: 'foo' }
              ^
SyntaxError: Unexpected token }
var default = 'foo'
    ^^^^^^^
SyntaxError: Unexpected token default

@ljharb I'm following @ntdb's recommendation to leave the test in and downgrade the library. My only goal is to get tests to pass so I can unblock quite a few PRs (selfishly #754 😄)

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Sounds good for now, but we should work on a PR that addresses the test and unpins the dependency, ASAP.

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

Successfully merging this pull request may close these issues.

3 participants