-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
chore(website): generate rule docs options automatically #5386
chore(website): generate rule docs options automatically #5386
Conversation
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. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
You need to move this remark plugin from |
are we planning to add description fields to schema of rules, for describing specific options? https://json-schema.org/draft/2020-12/json-schema-core.html#name-schema-vocabularies |
@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. |
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
There was a problem hiding this 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:
This is looking good to me - I spot checked a number and they looked good!
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoshuaKGoldberg resolve the conflicts and we can merge this! |
PR Checklist
Overview
Uses even more fancy Markdown AST manipulations in the
generated-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## Options
:.eslintrc.cjs
snippet adds in the suggested config usageThis rule is not configurable.
text is addedjson-schema-to-typescript
andprettier
are used to print the types anddefaultConfig
description
fields are used in rule schema metadata instead of.md
explanationsAssorted other standardizations:
## Options
(e.g.ban-ts-comment.md
)ban-types.md
comma-dangle.md
)/* eslint ... */
comments in options examplesSome old todos from when this PR was a draft should be done:
get Options heading in right sidebar✅see if json-schema-to-typescript can make shared types for repeated shapesthis week I learned,definitions
properties are the intended way to explicitly do that in json-schema ✨ ✅finish trimming down more rule docs✅.md
files