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

🚀 Feature: Message URLs can't be cmd/ctrl-clicked in VS Code #39

Open
JoshuaKGoldberg opened this issue Dec 4, 2024 · 1 comment

Comments

@JoshuaKGoldberg
Copy link

VS Code by default turns auto-detectable file path indicators in terminals into cmd/ctrl-clickable links to open the file in the editor. If there's a line:col indicator or similar it'll pick that up too. The detection by default picks up ESLint's default stylish reporter.

Typically, the whole ESLint message turns into a clickable link:

VS Code terminal showing underline around all of an ESLint stylish report: '/Users/josh/repos/mocha/docs/_data/usage.js \n 3:19  error  "strip-ansi" should be replaced with an alternative package. Read more here: https://github.com/es-tooling/module-replacements/blob/main/docs/modules/strip-ansi.md  depend/ban-dependencies'

Unfortunately, that means the GitHub link to the module's .md file isn't itself clickable. You have to manually select it. Irksome!

You can get around this by putting a \n in the report message, like:

VS Code terminal showing underline only under the Markdown URL of a now split-into-lines ESLint stylish report: '/Users/josh/repos/mocha/docs/_data/usage.js \n 3:19  error  "strip-ansi" should be replaced with an alternative package.\nRead more here: https://github.com/es-tooling/module-replacements/blob/main/docs/modules/strip-ansi.md  depend/ban-dependencies'

Personally, I think this is an issue for VS Code that it should respect the URL without \n trickery. But I figured I'd raise here and see what you think 🙂. Someone should probably search for / file an issue on VS Code.

@43081j
Copy link
Contributor

43081j commented Dec 4, 2024

Oof that is a pain

It's probably ok for us to just add the new line in for now since it does actually help with presentation too I think

But you're right, we should open or find an issue in vscode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants