Created
October 5, 2016 08:31
-
-
Save nakajmg/ed284ae4d3be5ab1a1683580e03927e7 to your computer and use it in GitHub Desktop.
textlint with prh plugin, execute to dynamically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TextLintCore = require('textlint').TextLintCore | |
const prh = require('textlint-rule-prh') | |
function linter(filePath, rulePaths) { | |
const core = new TextLintCore() | |
core.setupRules({prh: prh}, { | |
prh: {rulePaths, rulePaths} | |
}) | |
core.lintFile(filePath).then((results) => { | |
console.log(results) | |
}) | |
} | |
linter('/path/to/file.md', ['/path/to/dictionary.yml']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment