textlint filter rule that filter error about specified node type.
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.
npm install textlint-filter-rule-node-types
Dependencies
- textlint >=6.9.0
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.
npm test
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.
Opposite <-> textlint-rule-report-node-types.
- 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