MCPcopy
hub / github.com/prettier/prettier / hasPrettierIgnore

Function hasPrettierIgnore

src/language-html/utilities/index.js:83–99  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

81}
82
83function hasPrettierIgnore(node) {
84 /* c8 ignore next 3 */
85 if (node.kind === "attribute") {
86 return false;
87 }
88
89 /* c8 ignore next 3 */
90 if (!node.parent) {
91 return false;
92 }
93
94 if (!node.prev) {
95 return false;
96 }
97
98 return isPrettierIgnore(node.prev);
99}
100
101function isPrettierIgnore(node) {
102 return node.kind === "comment" && node.value.trim() === "prettier-ignore";

Callers 4

shouldNotPrintClosingTagFunction · 0.90
isPreviousBlockUnClosedFunction · 0.90
printChildFunction · 0.90
printBetweenLineFunction · 0.90

Calls 1

isPrettierIgnoreFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…