Files
test-repo/tests/trailing_comma/trailing_whitespace.js
T
Christopher Chedeau ea957ed64a Fix function trailing comment location (#1195)
It turns out that we can't reliably detect with the ast if a comment is before or after the ). In order to fix this same problem with `if` I added the `getNextNonSpaceNonCommentCharacter` function. We can use the same here to fix the problem.

Fixes #933
2017-04-12 14:18:29 -07:00

44 lines
503 B
JavaScript

let example = [
'FOO',
'BAR',
// Comment
];
foo({},
// Comment
);
o = {
state,
// Comment
};
o = {
state,
// Comment
};
function supersupersupersuperLongF(
supersupersupersuperLongA,
supersupersupersuperLongB
// Comment
) {
a
}
function supersupersupersuperLongF(
supersupersupersuperLongA,
supersupersupersuperLongB,
// Comment
) {
a
}
this.getAttribute(function(s)
/*string*/ {
console.log()
});
this.getAttribute(function(s) /*string*/ {
console.log()
});