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
Classes and Missing space before function parentheses. (space-before-function-paren) #346
Comments
I don't think setting the parser to babel-eslint is required anymore. When I take the code above and paste it into http://standardjs.com/demo it comes back valid with no errors. Could you try reinstalling the latest version of standard and testing again? |
Everything is up-to-date. I reinstalled Standard just in case but no difference. Still the same error that indeed doesn't appear on the standardjs demo page. For the parser, without it, I have weird stuff like an |
Ah ha ! Just found the problem ! I'm using vim as well as the auto-format taken from the readme: It was actually removing the space between the function name and the I guess the problem would rely in the formatter then... and maybe some change to the vim autoformat command would help detect other potential future error ? |
Does standard actually support ES6 features that are now part of the stable node.js build? export class Foo {
constructor (bar) {
this.baz(bar)
}
baz (bar) {
console.log(bar)
}
test () {
console.log('test')
}
} Using this code snippet with standardjs.com/demo, "Format" button not giving a correct result: export class Foo {
constructor( bar) {
this.baz(bar)
}
baz( bar) {
console.log(bar)
}
test() {
console.log('test')
}
} Of course after code was formatted, linter reports errors. Thats an incorrect behaviour. Same story with the object shorthand: let test = {
foo () {
console.log('foo')
}
}
test.foo() After format, becomes the let test = {
foo() {
console.log('foo')
}
}
test.foo() Generating new "Missing space before function parentheses" error. |
+1 same problem as @yura415: the formater messes up the parentheses spacing. |
+1 getting the same thing. The formatter breaks the subsequent lint. |
Yeah, the formatter has issues with some ES6 features. You can help fix these issues by contributing to the This issue is already open on that issue tracker: max-mapper/standard-format#134 |
Ok, I'm not sure if it's the right place to post the issue but I haven't manage to determine if the problem lies in standard or eslint or babel-eslint... maybe you could help me !
Same problem than posted here(#59). I tried to test with Eslint using the rc/.eslintrc of this project but I'm still confuse with all that.
giving:
Missing space before function parentheses. (space-before-function-paren)
In package.json:
The text was updated successfully, but these errors were encountered: