stylelint / vscode-stylelint

The official Visual Studio Code extension for Stylelint
https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint
MIT License
318 stars 31 forks source link

[Feature]: Emit diagnostics for ranges instead of single positions #336

Open adalinesimonian opened 2 years ago

adalinesimonian commented 2 years ago

What problem does this feature solve?

Unlike other linter integrations, we only display diagnostics for a single position. This makes for a confusing and less useful experience for users.

How does this feature solve the problem?

We should emit diagnostics for ranges that better describe the location of problems.

What are some alternatives to this feature?

No response

Code of Conduct

adalinesimonian commented 2 years ago

Blocked by stylelint/stylelint#5694

kizu commented 1 year ago

Just want to mention that the issue that was blocking this was fixed — now stylelint provides optional endLine and endColumn, which, when present, could be used to define a range to report.

I'm not familiar with where to look in the plugin to implement this, so maybe someone more knowledgable about the plugin's codebase could look into it, or maybe point me toward where to look at — then if I would find time, I could introduce this change.

jeddy3 commented 1 year ago

@kizu I believe the bulk of the work was done in https://github.com/stylelint/vscode-stylelint/pull/358. There hasn't been the time to get it over the finish line, though. I think there are a few dependent PRs and issues to wrangle (https://github.com/stylelint/vscode-stylelint/pull/426 and so on).

If you do find time, then taking a look would be fantastic! I've added you as a member to the Stylelint org (it should have happened automatically after your pull request in the stylelint/stylelint repo was merge, but the bot is playing up), so that you can push directly to the WIP branches if you want.

adalinesimonian commented 1 year ago

I appreciate the help! #426, if I remember correctly, should be a good base to improve and add this support from. I've sadly not had the time, as just as I was supposed to free up last year, my company's engineering department went through a re-organization, and after the new year came around, my father ended up falling seriously ill. C'est la vie.

426 should also introduce upstream changes from adalinesimonian/jest-runner-vscode to get e2e tests passing. I'm happy to provide answers and assist if anything comes up, but for the time being, I don't have the bandwidth to implement these changes myself. Thanks for your interest in the project!