Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return pkgNames.filter(pkgName => {
const ruleOrFilter =
pkgName.indexOf(TextlintPackageNamePrefix.filterRule) !== -1 ||
pkgName.indexOf(TextlintPackageNamePrefix.rule) !== -1;
if (pkgName === "textlint-rule-helper") {
return false;
}
return ruleOrFilter;
});
})
.filter(pkgName => {
return pkgName.indexOf(TextlintPackageNamePrefix.filterRule) !== -1;
})
.map(filterName => {