The pluggable natural language linter for text and markdown.
MIT License
Bot releases are visible (Hide)
Lint API always return Promise.
TextLintCore#LintFile
TextLintCore#LintText
TextLintEngine#executeOnFiles
TextLintEngine#executeOnText
cli#execute
export default function (context) {
return {
[Syntax.Str](node){
// textlint wait for resolved the promise.
return new Promise((resolve, reject) => {
// async task
});
}
}
}
TIMING=1
(6d1dae9)Set TIMING=1
to env, and show performance of each rules.
$ TIMING=1 textlint README.md
Rule | Time (ms) | Relative
:-------------------------------|----------:|--------:
spellcheck-tech-word | 124.277 | 70.7%
prh | 18.419 | 10.5%
no-mix-dearu-desumasu | 13.965 | 7.9%
max-ten | 13.246 | 7.5%
no-start-duplicated-conjunction | 5.911 | 3.4%
See https://github.com/textlint/textlint/blob/master/docs/create-rules.md#rule-performance
Thanks to ESLint.
Published by azu almost 9 years ago
You can use custom parser.
it means that use can use textlint with any file type by creating Processor Plugin
textlint's own parsers are already Processor Plugin.
If you are interested in Processor Plugin and see https://github.com/textlint/textlint/blob/master/docs/plugin.md
Published by azu almost 9 years ago
experimental
textlint could lint HTML file(.html
).
$ textlint readme.html
for more detail docs/configuring.md
Breaking Change
TextLintMessage
#38 #40The Breaking Change related to textlint
module user(use-as-modules.md).
Features
TextLintEngine#executeOnText
and textlint#lintText
support ext
arguments. #36
executeOnText(text, ".md")
TextLintCore
#41Fixed
Published by azu about 9 years ago
textlint plugin is a set of rules and rulesConfig.
To enable plugin, put the "plugin-nameinto.textlinrc`.
// `.textlinrc`
{
"plugins": [
"plugin-name"
],
// overwrite-plugins rules config
// <plugin>/<rule>
"rules": {
"plugin-name/rule-name" : false
}
}
Published by azu about 9 years ago
Published by azu about 9 years ago
Published by azu about 9 years ago
rulesBaseDirectory
to Config.setRulesBaseDirectory
and addRule
for hacking #23Published by azu about 9 years ago
Published by azu about 9 years ago