eslint / markdown

Lint JavaScript code blocks in Markdown documents
MIT License
391 stars 60 forks source link

docs: update rules table during build #274

Closed fasttime closed 3 weeks ago

fasttime commented 3 weeks ago

Added a tool that generates the rules table in README.md automatically from rules metadata. The rules table will be generated per npm script during the build.

Maybe we will also want to make sure that the rules table is up-to-date each time a commit is merged into the main branch. I'm not sure what's the best way to achieve this.

Fixes #273

nzakas commented 3 weeks ago

It seems like we could do this via lint-staged whenever a change is made in the src/rules directory and cover our bases?

fasttime commented 3 weeks ago

It seems like we could do this via lint-staged whenever a change is made in the src/rules directory and cover our bases?

Updated in bf20bb21c5737b09355110fc678439edd1ee0499. I also tweaked the tool so it doesn't crash if someone forgets to add metadata to a rule.