Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

azu/textlint-rule-no-empty-section

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

textlint-rule-no-empty-section

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.

Features

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

Section

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

Install with npm:

npm install textlint-rule-no-empty-section

Usage

Via .textlintrc(Recommended)

{
    "rules": {
        "no-empty-section": true
    }
}

Via CLI

textlint --rule no-empty-section README.md

Reference

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

Contributing

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-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

About

textlint rule not allow to create empty section.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published