textlint

The pluggable natural language linter for text and markdown.

MIT License

Downloads
7.4M
Stars
2.8K
Committers
83

Bot releases are visible (Hide)

textlint -

Published by azu almost 9 years ago

Breaking Change

Lint API always return Promise.

  • TextLintCore#LintFile
  • TextLintCore#LintText
  • TextLintEngine#executeOnFiles
  • TextLintEngine#executeOnText
  • cli#execute

Festures

  • Rule: async support #74

How to write async rule

export default function (context) {
    return {
        [Syntax.Str](node){
            // textlint wait for resolved the promise.
            return new Promise((resolve, reject) => {
                // async task
            });
        }
    }
}
textlint -

Published by azu almost 9 years ago

Bug Fixes

Fix this ReferenceError.

ReferenceError: rule: <plugin>/<rule> is not found

  • config: should not set Plugin's rule to rules (9623bca), closes #76
textlint -

Published by azu almost 9 years ago

rule-context

add #getFilePath method

getFilePath return current linting filePath.

textlint -

Published by azu almost 9 years ago

Bug Fixes

  • config: plugin's rulesConfig is overwrite by textlintrc config (d5efd52)
  • plugin: set set plugins's config to <plugin>/<rule> (d671036), closes #71
textlint -

Published by azu almost 9 years ago

Bug Fixes

Fix to load plugins #69

  • config: correct merging options and textlintrc options (5d44c83), closes #69
textlint -

Published by azu almost 9 years ago

Features

  • perf: show rule performance if set 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.

textlint - https://github.com/textlint/textlint/releases/tag/4.5.0

Published by azu almost 9 years ago

Bug Fixes

Features

  • cli: split up cli.execute into executeWithOptions (ea06688)
textlint -

Published by azu almost 9 years ago

Bug Fixes

Features

  • rule-context: context.report can also report any data (d5efa9c) #63
textlint -

Published by azu almost 9 years ago

Features

  • Processor Plugin: Custome Parser #37

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

Bug Fixes

  • engine: fix warning message (f9da926)
textlint - https://github.com/textlint/textlint/releases/tag/4.2.2

Published by azu almost 9 years ago

textlint -

Published by azu almost 9 years ago

Feature

experimental

  • HTML support #51

textlint could lint HTML file(.html).

$ textlint readme.html

Bug Fixes

  • config: don't overwrite defaultOptions object (1e1d6b4)
textlint -

Published by azu about 9 years ago

chore:

  • allow an empty text with lint #46

Thank you @koba04

textlint -

Published by azu about 9 years ago

Bug Fixes

Features

  • rule: implement warning of rule (c40e218) #44

for more detail docs/configuring.md

textlint -

Published by azu about 9 years ago

Breaking Change

  • Switch to 1-based columns on TextLintMessage #38 #40

The Breaking Change related to textlint module user(use-as-modules.md).

Features

  • TextLintEngine#executeOnText and textlint#lintText support ext arguments. #36
    • use like executeOnText(text, ".md")
  • expose TextLintCore #41
  • Add "json" formatter #5

Fixed


3.7.1...4.0.0

  • jscs: format code for jscs (9556ea1)
  • engine: support extenstion (933492a)
  • index: expose TextLintCore to index (fccee7c)
  • plugin: introduce plugin Processor (d3d6e70)
textlint - 3.7.0 textlint plugin support

Published by azu about 9 years ago

textlint plugin support #32

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
    }
}

Bug Fixes

  • engine: fix check the rule is loaded (e032214)
  • jsdoc: remove | (00641cc)
  • plugin: use normalize path (cc0361a)
  • test: rename example plugin (ab84f5e)

Features

  • plugin: add --plugin command line options (e250405)
  • plugin: support plugin (9cfa7d8)
textlint - Moving to ES6

Published by azu about 9 years ago

Bug Fixes

  • rule: fix jsdoc annotation (da80767)
  • travis: use node.js stable (3d80b77)

Features

  • es6 move to ES6! #11
  • example: add examples (d97a986)
  • npm: add jscs to test (afeb932)
textlint - https://github.com/textlint/textlint/releases/tag/v3.6.0

Published by azu about 9 years ago

Features

  • context: add config to RuleContext (ec23668)
textlint - v3.5.0

Published by azu about 9 years ago

  • Add rulesBaseDirectory to Config.
  • Add setRulesBaseDirectory and addRule for hacking #23
textlint - https://github.com/textlint/textlint/releases/tag/3.4.0

Published by azu about 9 years ago

Features

  • engine: add TextLintEngine#loadRule (b23a91e), closes #19
textlint - https://github.com/textlint/textlint/releases/tag/v3.3.1

Published by azu about 9 years ago

Bug Fixes

  • config: don't overwrite `rulesConfig" (5d1168c)