(node, languageName)
| 62 | } |
| 63 | |
| 64 | function hasLeadingBlockCommentWithName(node, languageName) { |
| 65 | // This checks for a leading comment that is exactly `/* GraphQL */` |
| 66 | // In order to be in line with other implementations of this comment tag |
| 67 | // we will not trim the comment value and we will expect exactly one space on |
| 68 | // either side of the GraphQL string |
| 69 | // Also see ./clean.js |
| 70 | return hasComment( |
| 71 | node, |
| 72 | CommentCheckFlags.Block | CommentCheckFlags.Leading, |
| 73 | ({ value }) => value === ` ${languageName} `, |
| 74 | ); |
| 75 | } |
| 76 | function hasLanguageComment({ node, parent }, languageName) { |
| 77 | return ( |
| 78 | hasLeadingBlockCommentWithName(node, languageName) || |
no test coverage detected
searching dependent graphs…