Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): apply offsets for htmlish js file sources #3494

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

dyc3
Copy link
Contributor

@dyc3 dyc3 commented Jul 22, 2024

Summary

When we print diagnostics, previously the spans would be relative to the start of the js code, not to the start of the file. This was causing diagnostics to point to the wrong line for vue, svelte, and astro files.

fixes #3366

Test Plan

Tested manually on some of my own vue/svelte projects. Updated the snapshots.

@github-actions github-actions bot added A-CLI Area: CLI A-Diagnostic Area: diagnostocis labels Jul 22, 2024
@dyc3 dyc3 marked this pull request as draft July 22, 2024 13:49
@dyc3 dyc3 force-pushed the cli-htmlish-lint-offsets branch from d80aa45 to 16095ab Compare August 2, 2024 13:26
@dyc3 dyc3 marked this pull request as ready for review August 2, 2024 13:26
@dyc3 dyc3 merged commit 221a74f into biomejs:main Aug 2, 2024
11 checks passed
@dyc3 dyc3 deleted the cli-htmlish-lint-offsets branch August 2, 2024 17:20
@ematipico
Copy link
Member

@dyc3 I forgot to mention that it would be great to update the changelog

@davidglezz
Copy link

davidglezz commented Oct 8, 2024

Strange
Version: 1.9.3
Biome error:
Catch clause variable type annotation must be 'any' or 'unknown' if specified.
on array (I mean, incorrect line of vue file)

@ematipico
Copy link
Member

@davidglezz please don't comment on closed issues. Please open a new issue with a reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI A-Diagnostic Area: diagnostocis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Invalid line/column calculating in Vue files
3 participants