RichardLitt / standard-readme-preset

remark preset to configure remark-lint with settings that enforce standard-readme.
ISC License
12 stars 8 forks source link

Make a list of rules from the spec #4

Open RichardLitt opened 7 years ago

RichardLitt commented 7 years ago

Initially, you can make them as packages in this folder, and then require them in index.js file as needed. When they are suitably abstracted, put them into their own packages.

wooorm commented 7 years ago

Here’s some more ideas. The checked ones are in GH-6 and GH-8.

List of rules
List of external rules that may be useful
List of random ideas for rules
wooorm commented 7 years ago

Finally, as a start to validate the schema / heading outline, I created the following list from the spec:

Schema
RichardLitt commented 6 years ago

That looks right to me! Maintainer is optional, now. This should be relatively easy to check - for instance, the banner, badges, short and long description could be ignored in a heading check. Check the beginning to match, and the last two, and then note if any of the ones present are mistakenly put in the extra sections bit.

wooorm commented 6 years ago

Yeah I was thinking about how to check the heading-less stuff too. I came up with the idea of a utility that transforms the AST into a schema (an object form of the above), which you can then check for validity (or use for other tools!)

RichardLitt commented 6 years ago

The headingless-stuff should only really be in the main section before any second level headers (which would be TOC, background, security, or install). So, that should be in a separate check. That makes checking the titles easier, right?

wooorm commented 6 years ago

True, yeah definitely! I was thinking more about how to do it perfectly, how it’s supposed to be, than how to do it quickly/for now!

wooorm commented 6 years ago

Modified the above schema to make Maintainers optional.

wooorm commented 6 years ago

https://github.com/RichardLitt/standard-readme-preset/issues/4#issuecomment-344414333 updated for GH-8.