-
I'm trying to run textlint v13.3.3 with textlint-filter-rule-comments v 1.2.2 as a module like this: const engine = new textlint.TextLintEngine({
rules: [
'doubled-spaces',
],
filters: {
comments: true,
},
});
// Reading file to fileContent.
engine.executeOnText(fileContent, '.md'); The rule is correctly applied, but the filter doesn't seem so, because e.g. the below Markdown still fails on it with "warning doubled-spaces: Found doubled spaces."
What am I doing wrong, how can the filter be loaded and executed? My full code with this change is here: Lombiq/NodeJs-Extensions@cf64bf0 I tried this too, but it doesn't help: const engine = new textlint.TextLintEngine({
rules: [
'doubled-spaces',
],
filters: [
'comments',
],
}); It's as if the filter isn't applied at all, but I can't get any more information. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is undocument way. textlint/packages/textlint/src/config/config.ts Lines 361 to 363 in 67b62c6
|
Beta Was this translation helpful? Give feedback.
This is undocument way.
Probabaly, you can use
filterRules
instead offilters
.textlint/packages/textlint/src/config/config.ts
Lines 361 to 363 in 67b62c6
TextLintEngine
is deprecated in textlint v14.0.0 · textlint.