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
- textlint >=6.9.0
Usage
If you want to ignore BlockQuote
node, define "BlockQuote"
to "nodeTypes"
.
.textlintrc
OR
.textlintrc
as JavaScript config file.
const TextLintNodeType = TextLintNodeType;moduleexports = "filters": "node-types": "nodeTypes": TextLintNodeTypeBlockQuote
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
- 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
License
MIT