We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ast
commentsExistBetween
1 parent a2b9dd5 commit 471dfc3Copy full SHA for 471dfc3
apps/oxlint/src-js/plugins/source_code.ts
@@ -295,6 +295,8 @@ export const SOURCE_CODE = Object.freeze({
295
* @returns `true` if one or more comments exist.
296
*/
297
commentsExistBetween(nodeOrToken1: NodeOrToken, nodeOrToken2: NodeOrToken): boolean {
298
+ if (ast === null) initAst();
299
+
300
// Find the first comment after `nodeOrToken1` ends.
301
// Check if it ends before `nodeOrToken2` starts.
302
const { comments } = ast,
0 commit comments