Skip to main content

Function: createCommentValueSourceLocation()

createCommentValueSourceLocation(comment: Readonly<Comment>, sourceCode: Readonly<TSESLint.SourceCode>, startOffset: number, endOffset: number): SourceLocation

Defined in: _internal/comment-prose.ts:296

Convert a comment-relative text span into an ESLint source location.

Parameters

comment

Readonly<Comment>

Source comment token.

sourceCode

Readonly<TSESLint.SourceCode>

Source code utility object.

startOffset

number

Inclusive start offset within comment.value.

endOffset

number

Exclusive end offset within comment.value.

Returns

SourceLocation

ESLint location for the requested span.