Skip to content

Commit

Permalink
fix(eslint): filter out messages outside range
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 13, 2024
1 parent ae1d55c commit 4b5232d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/twoslash-eslint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export function createTwoslasher(options: CreateTwoslashESLintOptions): Twoslash
}

const nodes = resolveNodePositions(merged, code)
.filter(i => i.line < pc.lines.length) // filter out messages outside of the code

const results: TwoslashGenericResult = {
code,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4b5232d

Please sign in to comment.