The pluggable natural language linter for text and markdown.
MIT License
Bot releases are hidden (Show)
In previous version, textlint can't lint specific file that contain table syntax.
[email protected] can lint the file that contain table syntax.
| Hello | World |
| :---- | -----: |
| How | are |
| you | today? |
We have updated markdown-to-ast@3.2.3 and remark@4.0.0.
[email protected] contain some breaking changes.
But, these changes are not related with things that are defined in textlint's specification.
Example:
See Release 4.0.0 · wooorm/remark for more detail on.
Not set rule and Not configure .textlintrc
Before:
$ textlint README.md
After:
$ textlint README.md
== Not have rules, textlint do not anything ==
=> How to set rule?
See https://github.com/textlint/textlint/blob/master/docs/configuring.md
-f
option resolve from pcakage name (b6b2b5b)See https://github.com/textlint/textlint/blob/master/docs/formatter.md for details on.
Published by azu almost 9 years ago
textlint-rule-preset-XXX
support
e.g.)
Rule-preset is a collection of rules.
Published by azu almost 9 years ago
Make Lint API asynchronous!
Lint API always return Promise.
TextLintCore#LintFile
TextLintCore#LintText
TextLintEngine#executeOnFiles
TextLintEngine#executeOnText
cli#execute
var textlint = new TextLintCore();
textlint.lintMarkdown("text").then(result => {
//
});
export default function (context) {
return {
[Syntax.Str](node){
// textlint wait for resolved the promise.
return new Promise((resolve, reject) => {
// async task
});
}
}
}
value
(c00646c)Published by azu almost 9 years ago
Published by azu almost 9 years ago
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