-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
Request for Enhanced JSON Output in Reporter #4868
Comments
I can see the use case for line/column numbers, but could you please elaborate on how code snippets would be beneficial? We mostly use JSON output for VSCode integration, where code snippets would not be used. Do you have a different use case in mind? |
Thanks for your response @DonIsaac |
I've been thinking that we should expose the linter as a crate and/or NPM package for better integration with other tools (e.g. bit, or hopefully even Next.js). How would you feel about consuming linter output via a crate, modifying it to suit your needs, and then consuming it via NAPI? This has the following advantages:
|
Consuming it via a crate with a npm package would be great for me. |
Another thing that I see missing in json format
for example:
with |
Hello 👋
the language server is using oxlint native with rust. and LSP is its own protocol with format. No need to check for it. |
@Sysix thanks, |
In the default reporter/output, line and column numbers are displayed directly, while in the JSON output, only the offset is returned. This requires users to manually calculate the line and column numbers.
Additionally, the default formatter provides valuable context by displaying the line of the error along with the preceding and following lines. However, users relying on the JSON output currently need to compute this context themselves.
It would be greatly beneficial if this information were included in the JSON output as well.
Thank you!
The text was updated successfully, but these errors were encountered: