Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(website): generate rule docs h1 and description automatically#5249

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg commentedJun 25, 2022
edited
Loading

PR Checklist

Overview

Continues the general work started in#5085 around automating the base template for rule docs. This time the# h1 and next description are added automatically. I changed the format a bit to match the non-code h1 and slightly different description from ESLint rule docs: e.g.https://eslint.org/docs/latest/rules/array-callback-return.

Followups that could be filed as issues:

armano2 reacted with thumbs down emoji
@nx-cloud
Copy link

nx-cloudbot commentedJun 25, 2022
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commit1ba4011. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 fromNxCloud.

@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 onhttps://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day.

@netlify
Copy link

netlifybot commentedJun 25, 2022
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit1ba4011
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/62dadeb37d49730009666d91
😎 Deploy Previewhttps://deploy-preview-5249--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site settings.

},
],
type: 'blockquote',
} as mdast.Blockquote);
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Docusaurus adds anh1 automatically if the file doesn't already start with one. So all we need to add is the description.

Copy link
Member

Choose a reason for hiding this comment

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

  1. Maybe use a paragraph instead of a quote?
  2. Add this to theRuleAttributes component instead of in Markdown? Thedescription is already part of the rule metadata available on client side.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I like it as a quote though 😄: it adds subtle differentiation and matches the ESLint docs.

ForRuleAttributes, that shows up after any existing initial paragraph 😕 so it would be out of order:

Screenshot of the adjacent-overload-signatures rule page with the description quote after the general text paragraph

@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewJune 25, 2022 20:31
@armano2
Copy link
Collaborator

i'm not sure about this one, docs at this point is slowly starting unusable in github

@Josh-Cena
Copy link
Member

docs at this point is slowly starting unusable in github

I think the ideais that the docs should not be viewed on GitHub but should be as maintainable as possible.

armano2 reacted with eyes emoji

@armano2
Copy link
Collaborator

I think the ideais that the docs should not be viewed on GitHub but should be as maintainable as possible.

if that is a case than we should move it out of eslint-plugin to docs

@JoshuaKGoldberg
Copy link
MemberAuthor

Yeah, this brings up a good point - it seems like#4980 is going to be particularly relevant now that the.md files are switching from "mostly useful" to "now barely useful". I'll do that here too.

@@ -1,7 +1,3 @@
# `your-rule-name`
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@armano2 starting a thread for#5249 (comment):

I think the idea is that the docs should not be viewed on GitHub but should be as maintainable as possible.

if that is a case than we should move it out of eslint-plugin to docs

I think I agree, it would be best long term to have these docs files in the docs area. But: the old .md files still have much better SEO than the site. We can't move them all-up just yet. The most we could do would be to leave a .md file in the old location with just the redirect notice.

What would you prefer I do in this PR? I don't have strong feelings one way or another, as long as we're moving towards automating more of the rule docs pages.

Copy link
Member

Choose a reason for hiding this comment

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

Personally - I think it's still a good idea to co-locate them with the plugin - that way they're easy to find and update for contributors.

Copy link
Member

Choose a reason for hiding this comment

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

I am 100% behind treating the .md files in the repo as source code for most things (i.e. users shouldn't read them).
It's what I said a year ago with the first versions of the website!

Also LMAO I had a different opinion back then about where to put the files:

TBH - I also don't see any tangible value in co-locating the docs with the packages.

So I'll say - I don't mind either way. As long as we keep things clearly documented for contributors (i.e. tests to fail if they've not been added, or not been deleted) - then it shouldn't matter.

@bradzacherbradzacher added the package: websiteIssues related to the @typescript-eslint website labelJun 27, 2022
bradzacher
bradzacher previously approved these changesJul 18, 2022
@JoshuaKGoldbergJoshuaKGoldbergenabled auto-merge (squash)July 22, 2022 17:30
@bradzacherbradzacher merged commit8c1a662 intotypescript-eslint:mainJul 22, 2022
@JoshuaKGoldbergJoshuaKGoldberg deleted the generated-rule-docs-h1-and-description branchJuly 22, 2022 22:29
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsAug 22, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@Josh-CenaJosh-CenaJosh-Cena left review comments

@bradzacherbradzacherbradzacher approved these changes

Assignees
No one assigned
Labels
package: websiteIssues related to the @typescript-eslint website
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Docs: Add a move notice on the top of every rule .md file Rework template for individual Rules pages
4 participants
@JoshuaKGoldberg@armano2@Josh-Cena@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp