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

Documentation links are broken due to fork versioning #76

Open
tetarchus opened this issue Apr 28, 2024 · 0 comments
Open

Documentation links are broken due to fork versioning #76

tetarchus opened this issue Apr 28, 2024 · 0 comments

Comments

@tetarchus
Copy link

tetarchus commented Apr 28, 2024

The documentation URL generator function appears to have been broken by forking and changing versions.

import pkg from '../../package.json'

const repoUrl = 'https://github.com/un-ts/eslint-plugin-import-x'

export const docsUrl = (ruleName: string, commitish = `v${pkg.version}`) =>
  `${repoUrl}/blob/${commitish}/docs/rules/${ruleName}.md`

As the value of commitish is the current version of the package (0.5.0) by default, this generates the URL:
https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/newline-after-import.md.

Due to this being a fork of the original eslint-plugin-import which had a version 0.5.0, there is already a tag v0.5.0 from 9 years ago which does not include the docs folder, and therefore directs you to the incorrect location if using tools such as VSCode's ESLint extension which allows you to click the rule name to be taken to its documentation.

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

1 participant