-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Prettier 2.8.1
Playground link
# Options (if any):
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;
}
Metadata
Metadata
Assignees
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.