Skip to content

textlint filter rule that ignore node's type if the type is reported.

License

Notifications You must be signed in to change notification settings

textlint/textlint-filter-rule-node-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

textlint-filter-rule-node-types Build Status

textlint filter rule that filter error about specified node type.

Story

You have used various textlint rule. These work fine, but you want to ignore some reported error in your text.

FooRule also check the BlockQuote text, but you want to ignore the BlockQuote text.

textlint-filter-rule-node-types rule resolve the issue.

This is filter rule of textlint.

Installation

npm install textlint-filter-rule-node-types

Dependencies

Usage

If you want to ignore BlockQuote node, define "BlockQuote" to "nodeTypes".

.textlintrc

{
    "filters": {
        "node-types": {
            "nodeTypes": ["BlockQuote"]
        }
    }
}

OR

.textlintrc as JavaScript config file.

const TextLintNodeType = require("textlint").TextLintNodeType;
module.exports = {
    "filters": {
        "node-types": {
            "nodeTypes": [TextLintNodeType.BlockQuote]
        }
    }
}

If you want to know all types of TxtNode, please see the document.

Tests

npm test

Knowledge

ESLint have a feature like Disabling comment.

textlint not define file syntax. For example, Markdown format have not comment syntax(have only html comment).

We can resolve the issue by the ignoring rule instead of disabling comment.

Of course, disabling comment could be implemented as ignoring rule.

Related

Opposite <-> textlint-rule-report-node-types.

Contributing

  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

About

textlint filter rule that ignore node's type if the type is reported.

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published