Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Destructuring default values #1441

Closed
nicolo-ribaudo opened this issue Jun 8, 2015 · 4 comments
Closed

Destructuring default values #1441

nicolo-ribaudo opened this issue Jun 8, 2015 · 4 comments
Labels

Comments

@nicolo-ribaudo
Copy link

function x({ a = 1 }) {}
{
  "esnext": true
}

Reports Unexpected token = [parseError]

Esprima supports destructuring default values v2.2.0
jquery/esprima#1128

@qfox
Copy link
Member

qfox commented Jun 8, 2015

Yeah, but we still using 1.x branch ;-( Upgrade were planned.

@hzoo
Copy link
Member

hzoo commented Jun 8, 2015

@nicolo-ribaudo

Add the esprima option to your .jscsrc and pick a different parser (esprima, esprima-fb, babel-jscs)
(you will need to npm install it)

//.jscsrc
{
    "esprima": "./node_modules/esprima", // or
    "esprima": "./node_modules/esprima-fb", // or
    "esprima": "./node_modules/babel-jscs",
    ...
}

@markelog markelog added the esnext label Jun 9, 2015
@hzoo
Copy link
Member

hzoo commented Jun 9, 2015

Yeah update is tracked in #1382, #1353

@hzoo
Copy link
Member

hzoo commented Jun 12, 2015

We can close this then right?

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

No branches or pull requests

4 participants