un-ts / eslint-plugin-import-x

`eslint-plugin-import-x` is a fork of `eslint-plugin-import` that aims to provide a more performant and more lightweight version of the original plugin.

Home Page:https://npm.im/eslint-plugin-import-x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation links are broken due to fork versioning

tetarchus opened this issue · comments

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.