Closed galvarez421 closed 8 years ago
/cc @oredi
btw, @galvarez421 you are welcome to try to fix it yourself, might be faster that way
Hello, I was trying to fix this bug, I found the following code to be of particular interest
if (comment.range[0] > currentNode.range[0] &&
comment.range[1] < currentNode.range[1]) {
// Stop processing comments that are within multiple declarators in a single variable declaration
break;
}
I believe we should also have a similar check for the previousNode, @markelog ?
Don't know, it could be
Rule that has issue: "requireVarDeclFirst: true" Code that will make jscs exhibit the issue: .jscsrc file:
test.js
node command:
The task will report an error for the line with the second assignment, but if I remove the comment in the function expression, the error goes away.
Using jscs 2.7.0 Operating system: Windows 7 64-bit