prettier/tests/comments/variable_declarator.js

67 lines
606 B
JavaScript

let obj1 = // Comment
{
key: 'val'
}
let obj2 // Comment
= {
key: 'val'
}
let obj3 = { // Comment
key: 'val'
}
let obj4 = {
// Comment
key: 'val'
}
let obj5 = // Comment
[
'val'
]
let obj6 // Comment
= [
'val'
]
let obj7 = [ // Comment
'val'
]
let obj8 = [
// Comment
'val'
]
let obj9 = // Comment
`val`;
let obj10 = // Comment
`
val
val
`;
let obj11 = // Comment
tag`val`;
let obj12 = // Comment
tag`
val
val
`;
let // Comment
foo1 = 'val';
let // Comment
foo2 = 'val',
bar = 'val';
const foo3 = 123
// Nothing to see here.
;["2", "3"].forEach(x => console.log(x))