textlint rule not allow to create empty section.
Empty section that exist Header, but has not other texts. In other words, This rule found Header only texts.
OK 💚
# Header A
text.
# Header B
text.
OK: Header 1
contains Header 2
# Header 1
## Header 2
text.
NG ❎
Found empty section:
# Header B
# Header A
text.
# Header B
This rule defined section as following:
The Markdown contents
# Header A
text.
# Header B
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)
{
"rules": {
"no-empty-section": true
}
}
Via CLI
textlint --rule no-empty-section README.md
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