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

[repo] Running yarn lint-staged on Windows with changes containing links causes pull request build failures #1197

Closed
NeillM opened this issue Dec 2, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed needs-triage repo

Comments

@NeillM
Copy link
Contributor

NeillM commented Dec 2, 2024

What is the issue that you're experiencing?

On Windows if you run yarn lint-staged on a commit that contains a link like [my link](./filter.md) it will be converted to a path like [my link](\docs\apis\core\reportbuilder\filtering.md)

I'm guessing it should probably be just left alone, since changing it to [my link](/docs/apis/core/reportbuilder/filtering.md) causes it's own issues.

Are you able to provide a patch for this?

Yes, in pull request #1198

@NeillM NeillM added bug Something isn't working help wanted Extra attention is needed repo labels Dec 2, 2024
@NeillM
Copy link
Contributor Author

NeillM commented Dec 3, 2024

It looks as though it is markdownlint-cli2 --fix that is doing this, probably via the renamedLinks Identify and fix renamed links rule which appears to be one we have added and not a part of the core markdownlint-cli2 ruleset.

@NeillM
Copy link
Contributor Author

NeillM commented Dec 3, 2024

It looks as though we are using the node.js path library in a way that makes the links work dependant on the OS, we can force it to always use more Linux like links by changing from just path to path.posix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed needs-triage repo
Projects
None yet
Development

No branches or pull requests

1 participant