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 options automatically#5386

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 commentedJul 26, 2022
edited
Loading

PR Checklist

Overview

Uses even more fancy Markdown AST manipulations in thegenerated-rule-docs.ts Docusaurus plugin to automate the creation of much of the rules docs pages.

  • ## How to Use, and `## Options are added if they don't yet exist
  • Contents are added to the beginning of## Options:
    • Base rule extensions have a link to the base rule's options
    • An.eslintrc.cjs snippet adds in the suggested config usage
    • If the rule isn't configurable, theThis rule is not configurable. text is added
    • If the rule is configurable,json-schema-to-typescript andprettier are used to print the types anddefaultConfig
  • description fields are used in rule schema metadata instead of.md explanations

Assorted other standardizations:

  • Using Docusaurus admonitions for deprecation notices and the like
  • Explaining default options is moved under## Options (e.g.ban-ts-comment.md)
  • Properly using tabs in at leastban-types.md
  • Listing out string literal options (e.g.comma-dangle.md)
  • Using/* eslint ... */ comments in options examples

Some old todos from when this PR was a draft should be done:

  • getOptions heading in right sidebar
  • see if json-schema-to-typescript can make shared types for repeated shapes this week I learned,definitions properties are the intended way to explicitly do that in json-schema ✨ ✅
  • finish trimming down more rule docs.md files

@nx-cloud
Copy link

nx-cloudbot commentedJul 26, 2022
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commitcfd750d. 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 commentedJul 26, 2022
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitcfd750d
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/62fd2cc1d601b70008c0dc47
😎 Deploy Previewhttps://deploy-preview-5386--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.

@Josh-Cena
Copy link
Member

  • getOptions heading in right sidebar

You need to move this remark plugin fromremarkPlugins tobeforeDefaultRemarkPlugins. Seehttps://docusaurus.io/docs/markdown-features/plugins#creating-new-rehyperemark-plugins

JoshuaKGoldberg reacted with heart emoji

@armano2
Copy link
Collaborator

@bradzacher
Copy link
Member

@armano2 i was thinking that would be an awesome thing to do! Already suggested!

https://twitter.com/bradzacher/status/1552009532124958720

It would be a decent chunk of work to add the descriptions for everything up-front.

Side note: would be easy to write a lint rule to enforce all schemas define descriptions.

JoshuaKGoldbergand others added2 commitsJuly 27, 2022 20:15
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewAugust 1, 2022 03:30
@bradzacherbradzacher added the package: websiteIssues related to the @typescript-eslint website labelAug 7, 2022
bradzacher
bradzacher previously approved these changesAug 7, 2022
Copy link
Member

@bradzacherbradzacher left a comment

Choose a reason for hiding this comment

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

https://deploy-preview-5386--typescript-eslint.netlify.app/rules/explicit-function-return-type

This one seems to be broken:

image


This is looking good to me - I spot checked a number and they looked good!

bradzacher
bradzacher previously approved these changesAug 17, 2022
Copy link
Member

@bradzacherbradzacher left a comment

Choose a reason for hiding this comment

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

image

@bradzacher
Copy link
Member

@JoshuaKGoldberg resolve the conflicts and we can merge this!

@bradzacherbradzacher added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelAug 17, 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

@armano2armano2Awaiting requested review from armano2

@bradzacherbradzacherAwaiting requested review from bradzacher

Assignees
No one assigned
Labels
1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we mergepackage: websiteIssues related to the @typescript-eslint website
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Docs: Automate the Options heading in rule docs pages
4 participants
@JoshuaKGoldberg@Josh-Cena@armano2@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp