requireSpaceBetweenArguments doesn't work in constructor of es6.
xiadengping opened this issue · 4 comments
xiadengping commented
I have set requireSpaceBetweenArguments in .jscsrc file,
"requireSpaceBetweenArguments": true,
This is a test code,
"use strict";
class A {
constructor(a,b) {
console.log(a,b);
}
}
jscs can only find line4 is invalid, shows "Missing space between , and b", but line3 is also invalid.
markelog commented
This rule applicable only for call expressions, see - http://jscs.info/rule/requireSpaceBetweenArguments since those are not arguments those are parameters.
You want validateParameterSeparator
markelog commented
Hm, but apparently validateParameterSeparator
doesn't notice class methods :/
xiadengping commented
Thanks :)
666don commented
He!p