Skip to content

negibokken/textlint-filter-rule-disable-next-line

Repository files navigation

textlint-filter-rule-disable-next-line Actions Status: test

textlint rule that ignore error using disable-next-line directive.

Install

Install with npm:

npm install textlint-filter-rule-disable-next-line

Dependencies:

Usage

Ignore error messages using disable-next-line

Example case in Markdown.

This is error text.

<!-- textlint-disable-next-line -->
This is ignored text by rule. Disables all rules under the disable-next-line comment.

This is error text.

Ignore specified rules:

<!-- textlint-disable-next-line ruleA,ruleB -->
Ignore RuleA and RuleB

This is error text.

The empty new line is ignored and rules are ignored on the next next line.

<!-- textlint-disable-next-line -->

This is ignored text by rule.

This is error text.

Settings

Via .textlintrc(Recommended)

{
    "filters": {
        "disable-next-line": true
    }
}

Options

  • disablingNextLineComment:
    • default: "textlint-disable-next-line"
{
    "filters": {
        "disable-next-line": {
            // if comment has the value, then disable textlint rule on next line
            "disablingNextLineComment": "textlint-disable-next-line",
        }
    }
}

Acknowledgement

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

License

MIT

Special Thanks

This repository's code is based on textlint-filter-rule-comments. Special thanks to azu for sharing the excellent implementation!

About

textlint filter rule that disables all rules under the comment directive.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published