Prettier 2.8.1
Playground link
Input:
class A {
@dec()
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
accessor b;
}
Output:
class A {
@dec()
accessor // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
b;
}
Expected behavior:
The comments should not be placed between the keyword accessor and the identifier b, which causes the accessor to be treated as a class field instead of a keyword. Expected:
class A {
@dec()
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
accessor b;
}
Prettier 2.8.1
Playground link
# Options (if any):Input:
Output:
Expected behavior:
The comments should not be placed between the keyword
accessorand the identifierb, which causes theaccessorto be treated as a class field instead of a keyword. Expected: