textlint rule that require {#id}
for each headers.
OK:
# Header {#id1}
## Header {#id2}
### Header {#id3}
#### Header {#id4}
##### Header {#id5}
NG:
# Header
## Header
Install with npm:
npm install @textlint-rule/textlint-rule-require-header-id
Via .textlintrc
(Recommended)
{
"rules": {
"@textlint-rule/require-header-id": true
}
}
Via CLI
textlint --rule @textlint-rule/require-header-id README.md
const DefaultOptions = {
/**
* Id style
*
* GitBook: {#id}
*/
style: "GitBook",
/**
* allow to header depth
* If you want to allow h1, set this option to follows
* [1]
*/
allowDepth: []
};
If you want to add another id style, please submit to Pull Request!
See Releases page.
Install devDependencies and Run npm test
:
npm i -d && npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT © azu