jscs-dev / babel-jscs

(deprecated) JSCS has merged with ESLint, so check out babel-eslint!
https://github.com/babel/babel-eslint
MIT License
27 stars 6 forks source link

requireSpacesInFunctionExpression issue #8

Closed vesparny closed 9 years ago

vesparny commented 9 years ago

Using:

"requireSpacesInFunctionExpression": {
    "beforeOpeningRoundBrace": true
  }

doesn't seem to work for ES6 classes methods

// no problem here
function ciao () {
  console.log('ciao');
}

// error here, despite the space
class Ciao {
  ciao () {
    console.log('ciao');
  }
}

this is the output from the console screen shot 2015-06-25 at 10 15 40

It works using esprima-fb

hzoo commented 9 years ago

Thanks for the report - I think it's the same issue as https://github.com/jscs-dev/babel-jscs/issues/4. I'l need to do a fix in upstream (jscs)?

What happens with the regular parser and esnext: true?

I'l try to get a fix in soon if it is an issue with jscs.

vesparny commented 9 years ago

Yeah I guess it's a duplicate. With esprima-fb works.