Awesome
standard-readme-preset
remark
preset to configure remark-lint
with settings that
enforce standard-readme
.
Install
npm:
npm install standard-readme-preset
Dependencies
- NodeJS. Check "engines" field in "package.json" for official supported versions
Usage
You probably want to use it on the CLI through a config file:
...
"remarkConfig": {
+ "plugins": ["standard-readme-preset"]
}
...
Or use it on the CLI directly
remark -u standard-readme-preset README.md
Or use this on the API:
var remark = require('remark');
var report = require('vfile-reporter');
remark()
+ .use(require('standard-readme-preset'))
.process('_Emphasis_ and **importance**', function (err, file) {
console.error(report(err || file));
});
Rules
This preset configures remark-lint
with the following rules:
remark-lint:appropriate-heading
— Check that the top-level heading matches the directory namestandard-readme:file-extension
— Check thatmd
is used as a file extensionstandard-readme:file-stem
— Check thatREADME
is used as a file stem (allows i18n:README.de
,README.en-GB
)standard-readme:require-file-extension
— Check that a file extension is usedstandard-readme:no-unknown-sections
— Check that only known sections are used, except for in the extra sectionsstandard-readme:require-sections
— Check that required sections (contributing
,license
) exist.table-of-contents
is required iftoc: true
is given, optional fortoc: false
, and otherwise inferred based on if the number of lines in the file, excluding the ToC itself, exceeds 100.install
andusage
are required ifinstallable: true
is given.standard-readme:section-order
— Check that sections are used in the order they’re supposed to
Contributing
Please do! Open an issue!