593 B
593 B
Add support for plugin.printer.printPrettierIgnored() (#18070 by @fisker)
For a node with prettier-ignore comment, Prettier prints the text of the node directly. However, this may cause problems, for example, the node needs to be parenthesized or needs to print a leading semicolon to prevent ASI issue in --no-semi mode.
Since Prettier main, plugins can add printPrettierIgnored() function to the printer to customize the prettier-ignored node print process. This function uses the extract same signature as plugin.printer.print()