Skip to content

docs(eslint-plugin): change createRule usage to point to website #4369

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

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Dec 30, 2021

PR Checklist

Overview

Changes the link in most rules' createRule usage to point to the general website instead of version-specific GitHub markdown files.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @JoshuaKGoldberg!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@nx-cloud
Copy link

nx-cloud bot commented Dec 30, 2021

☁️ Nx Cloud Report

CI ran the following commands for commit 019f34b. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 48 targets

Sent with 💌 from NxCloud.

@netlify
Copy link

netlify bot commented Dec 30, 2021

❌ Deploy Preview for typescript-eslint failed.

🔨 Explore the source changes: 019f34b

🔍 Inspect the deploy log: https://app.netlify.com/sites/typescript-eslint/deploys/61ce28a8d877d100094a7e2d

export const createRule = ESLintUtils.RuleCreator(
name =>
`https://github.com/typescript-eslint/typescript-eslint/blob/v${version}/packages/eslint-plugin/docs/rules/${name}.md`,
name => `https://typescript-eslint.io/rules/${name}`,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bradzacher I have a vague memory of you mentioning it's preferable to link to the specific version of a rule, but can't find where that was. Did that opinion ever exist, and if so, is it still accurate now that the website is ready?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

back in the beginning it was a huge problem for us changing rules regularly.
Now-a-days everything is super stable so I don't think it's worth worrying about any more.

If we want to build it into the website - we totally could, but I think at this stage of the project it's probably super low value.

@codecov
Copy link

codecov bot commented Dec 30, 2021

Codecov Report

Merging #4369 (019f34b) into main (4bb55a2) will increase coverage by 0.72%.
The diff coverage is 76.92%.

@@            Coverage Diff             @@
##             main    #4369      +/-   ##
==========================================
+ Coverage   93.88%   94.61%   +0.72%     
==========================================
  Files         297      147     -150     
  Lines       11193     7841    -3352     
  Branches     3253     2507     -746     
==========================================
- Hits        10509     7419    -3090     
+ Misses        416      233     -183     
+ Partials      268      189      -79     
Flag Coverage Δ
unittest 94.61% <76.92%> (+0.72%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...slint-plugin/src/rules/no-unnecessary-condition.ts 98.30% <ø> (ø)
...ackages/eslint-plugin/src/util/getWrappingFixer.ts 100.00% <ø> (ø)
...rc/rules/no-unnecessary-boolean-literal-compare.ts 90.36% <57.14%> (-3.15%) ⬇️
...s/eslint-plugin/src/util/collectUnusedVariables.ts 93.19% <100.00%> (-0.03%) ⬇️
.../eslint-plugin/src/util/explicitReturnTypeUtils.ts 100.00% <100.00%> (ø)
...ckages/eslint-plugin/src/util/getESLintCoreRule.ts 75.00% <100.00%> (ø)
packages/eslint-plugin/src/util/misc.ts 93.33% <100.00%> (ø)
.../experimental-utils/src/eslint-utils/nullThrows.ts
packages/type-utils/src/isTypeReadonly.ts
packages/type-utils/src/propertyTypes.ts
... and 146 more

@bradzacher bradzacher added the documentation Documentation ("docs") that needs adding/updating label Dec 31, 2021
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noice

export const createRule = ESLintUtils.RuleCreator(
name =>
`https://github.com/typescript-eslint/typescript-eslint/blob/v${version}/packages/eslint-plugin/docs/rules/${name}.md`,
name => `https://typescript-eslint.io/rules/${name}`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

back in the beginning it was a huge problem for us changing rules regularly.
Now-a-days everything is super stable so I don't think it's worth worrying about any more.

If we want to build it into the website - we totally could, but I think at this stage of the project it's probably super low value.

@bradzacher bradzacher changed the title docs: change createRule usage to point to website docs(eslint-plugin): change createRule usage to point to website Dec 31, 2021
@bradzacher bradzacher merged commit f8ad848 into typescript-eslint:main Dec 31, 2021
@JoshuaKGoldberg JoshuaKGoldberg deleted the rule-docs-link-website branch January 1, 2022 03:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Documentation ("docs") that needs adding/updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update repo/relative links in rules to point to website
2 participants