textlint rule not allow to create empty section.
npm install textlint-rule-no-empty-sectiontextlint rule not allow to create empty section.
OK :green_heart:
``Header A
text.
text.
`
OK: Header 1 contains Header 2
`Header 1
text.
`
NG :negative_squared_cross_mark:
> Found empty header: # Header2
`Header A
text.
`
This rule defined section as following:
The Markdown contents
`Header A
text.
text.
`
to be
``
------------|---- # Header A
|
Section1 | text.
|
------------|---- # Header B
|
Section2 | text.
|
------------|---------------
A section is slitted by Header Node.
Install with npm:
npm install textlint-rule-no-empty-section
Via .textlintrc(Recommended)
`json`
{
"rules": {
"no-empty-section": true
}
}
Via CLI
``
textlint --rule no-empty-section README.md
- text-testing/packages/select-section at master · azu/text-testing
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.
1. Fork it!
2. Create your feature branch: git checkout -b my-new-featuregit commit -am 'Add some feature'
3. Commit your changes: git push origin my-new-feature`
4. Push to the branch:
5. Submit a pull request :D
MIT © azu