Skip to content

docs: fix rule links in README #693

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

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

bmish
Copy link
Contributor

@bmish bmish commented Nov 21, 2022

Checks

  • I have read the contributing guidelines.
  • If some rule is added/updated/removed, I've regenerated the rules list (npm run generate:rules-list)
  • If some rule meta info is changed, I've regenerated the plugin shared configs (npm run generate:configs)

Changes

Follow-up to:

Fixes broken rule links as reported here.

Normally, eslint-doc-generator would never have any trouble with this. The reason for the trouble this time is that eslint-plugin-testing-library has some unusual setup:

  • The package root as specified by package.json ("main": "index.js") doesn't actually exist in that location, it exists in dist/ because of "pkgRoot": "dist" specified by semantic release.
    "main": "index.js",

  • Because of that, we have to point eslint-doc-generator to dist/ as the plugin root.
  • But then we have to correct the file paths with --path-rule-list "../README.md" and --path-rule-doc "../docs/rules/{name}.md" since these still live outside dist/.
  • And finally, we have to update the URL to the rule docs, since these aren't affected by the weirdness on disk, with --url-rule-doc "docs/rules/{name}.md".

Context

@Belco90 Belco90 changed the title Fix rule links in readme docs: fix rule links in README Nov 21, 2022
@Belco90 Belco90 merged commit c1be0cf into testing-library:main Nov 21, 2022
@Belco90
Copy link
Member

Belco90 commented Nov 21, 2022

@bmish Thanks for the extra context about the package root. It would be a good idea to make the dist location more explicit in this repo.

@github-actions
Copy link

🎉 This PR is included in version 6.0.0-alpha.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 5.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants