-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
[Docs] Add infrastructure for auto-generating markdown table and list #837
[Docs] Add infrastructure for auto-generating markdown table and list #837
Conversation
- Add readme.yml file to ensure table and list markdown content is auto-generated from rules folder - Add md-magic dependency and scripts to package.json for updating readme markdown - Add markdown.config.js file to add transformation functions to the transforms object - Add scripts to README markdown to keep documentation content in sync with readme - Disable `no-console` rule in markdown.config file in .eslintrc - Add errorOptions property to source files for rules with extra options Closes jsx-eslint#836
Codecov Report
@@ Coverage Diff @@
## main #837 +/- ##
=======================================
Coverage 99.22% 99.22%
=======================================
Files 98 98
Lines 1419 1419
Branches 479 479
=======================================
Hits 1408 1408
Misses 11 11
Continue to review full report at Codecov.
|
.github/workflows/readme.yml
Outdated
name: 'nvm install lts/* && npm install' | ||
with: | ||
node-version: 'lts/*' | ||
- run: npm run generate-list-of-rules:check |
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.
trailing newline (reminder for myself)
@@ -43,7 +43,7 @@ const validateId = (node) => { | |||
|
|||
export default ({ | |||
meta: { | |||
docs: {}, | |||
docs: { description: 'Enforce that a `label` tag has a text label and an associated control.' }, |
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.
should we add meta.docs.url
here, as well, to match the others?
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.
Done. I've updated the README markdown, too😄.
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.
Looks great! Other than the missing description, I can take care of the rest during the final rebase, if you'd prefer.
package.json
Outdated
"@babel/core": "^7.17.5", | ||
"@babel/register": "^7.17.0" |
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.
these should be alphabetized (edit: @
comes first tho)
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.
Thanks! I'll get this rebased and landed :-)
f027dec
to
9980d1d
Compare
Description
This PR adds infrastructure to keep a11y rules in the
/rules
folder in sync with theREADME
markdown content. It generates markdown list and table programmatically and makes sure their contents are kept up-to-date.Related Issue
Closes #836
Acceptance Criteria
markdown-magic
README
list and table are generated programmaticallyREADME
list and table are kept in sync with a11y rules in the /rules folder. Every time a new a11y rule is added to /rules folder ,README
list and table contents are refreshed programmaticallyType of Changes
Testing Steps / QA Criteria
npm install
to install project dependenciesREADME
table and list but keep in place theAUTO-GENERATED-CONTENT
markers tellingmarkdown-magic
to generate table and list contentsnpm generate-list-of-rules
to auto-generate the table and list contentsnpm generate-list-of-rules
to refresh the table and list contents