textlint

The pluggable natural language linter for text and markdown.

MIT License

Downloads
7.4M
Stars
2.8K
Committers
83

Bot releases are hidden (Show)

textlint -

Published by azu over 8 years ago

Bug Fixes

  • Allow to parse every markdown

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

For rule creator

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:

  • Rename link, src, href properties to url
  • Remove undefined value for checked on list-items
  • Rename horizontalRule to thematicBreak

See Release 4.0.0 · wooorm/remark for more detail on.


textlint -

Published by azu over 8 years ago

Features

  • cli: add --stdin-filename option (5f65619), closes #117

Usecase

cat readme.md | textlint --format compact --stdin

stdin as .txt by default.

cat readme.md | textlint --format compact --stdin --stdin-filename readme.md

stdin as .md

textlint -

Published by azu over 8 years ago

Document Features

  • When not have rules, suggest to what to do #111

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

Bug Fixes

  • docs: lint docs by textlint (c5d1a5e)
  • test: fix multiple done called (f51f3c2)

Features

  • textlint: add alexjs for linting docs (541683f)
  • typescript: add typing dir for npm (7816b99), closes #102
  • typescript: add property to d.ts (d0b238c)
textlint -

Published by azu almost 9 years ago

Features

  • formatter: -f option resolve from pcakage name (b6b2b5b)

See https://github.com/textlint/textlint/blob/master/docs/formatter.md for details on.

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

Published by azu almost 9 years ago

textlint -

Published by azu almost 9 years ago

Features

rule-preset support

textlint-rule-preset-XXX support

e.g.)

Rule-preset is a collection of rules.

  • rule
    • rule is a rule for linting.
  • rule-preset
    • rule-preset contains rules.
  • plugin
    • plugin contains rules and a processor.

rule-preset-plugin


  • cli: add --preset option to cli (ac7b477)
  • config: add "disabledRules" to config (a7a0665)
  • rule: support "preset" of rules (c16a475), closes #96
  • rule: support scoped module (545b763) #99
textlint -

Published by azu almost 9 years ago

Bug Fixes

  • rule-context: correct padding column number (bbd5793) #90
textlint - 5.0.0: Async support

Published by azu almost 9 years ago

Breaking Change

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 => {
      // 
});

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

Bug Fixes

  • async: fix race condition on async (07dd51c)
  • use interop-require instead of require for dynamic loading (86e3004), closes #81
    • could use code generated by Babel 6
  • docs: remove value (c00646c)
  • example: add pretest (f1c7a57)
  • test: fix test that are broken at timing (1ea0def)
  • test: fix throws test (64ee56b)
  • test: install textlint-plugin-html with devDependencies (7d3eaf0)
  • test: fix all test for async (f19a64b)

Features

  • example: add use-as-module example (bc41157)

Performance Improvements

  • test: use production env for test (ba2b501)

Related Modules

textlint - https://github.com/textlint/textlint/releases/tag/5.0.0-beta.2

Published by azu almost 9 years ago

Bug Fixes

  • engine: remove console.log (ef35b00)
textlint - https://github.com/textlint/textlint/releases/tag/5.0.0-beta.1

Published by azu almost 9 years ago

Bug Fixes

  • async: fix race condition on async (07dd51c)
  • test: fix all test for async (f19a64b)
  • use interop-require instead of require for dynamic loading (86e3004), closes #81

Performance Improvements

  • core: improve perfoemance (c7b27d1)
  • engine: initialize available extensions at once (60d9a8f)
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