We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c39e874 commit f77f647Copy full SHA for f77f647
1 file changed
src/slangPrinter.ts
@@ -8,14 +8,11 @@ import type { PrintFunction } from './types.d.ts';
8
function hasNodeIgnoreComment({ comments }: StrictAstNode): boolean {
9
// Prettier sets SourceUnit's comments to undefined after assigning comments
10
// to each node.
11
- return (
12
- comments &&
13
- comments.some(
14
- (comment) =>
15
- comment.value
16
- .slice(2, isBlockComment(comment) ? -2 : undefined)
17
- .trim() === 'prettier-ignore'
18
- )
+ return comments?.some(
+ (comment) =>
+ comment.value
+ .slice(2, isBlockComment(comment) ? -2 : undefined)
+ .trim() === 'prettier-ignore'
19
);
20
}
21
0 commit comments