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 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)
textlint -

Published by azu about 9 years ago

Features

.textlintrc config file

Allow to config the textlint rules by .textlintrc file.
Textlint find a .textlintrc in the current dir or related dir, and use it as config.
Also, specify config file by use of --config command line options.

If you want to know about .textlintrc, see https://github.com/azu/textlint#textlintrc

Example of config: azu/textlint-rule-max-ten

  • cli: add --config to command line options (ff57fda)
  • config: implement config-loader (348be8f)
  • config: pass rulesConfig to engine (cdfedf7)
  • textlint: pass ruleConfig to 2nd argument of rule function (3b18fdb)

Bug Fixes

  • config: correct this.rulesConfig variable (e9b5bcc)
  • config: fix error when no config file (75f1d6b)
  • d.ts: rename id to ruleId (324767c)
  • textlint: disable rule is didn't listen event (1c28d83)
textlint - https://github.com/textlint/textlint/releases/tag/3.2.0

Published by azu about 9 years ago

Features

  • textlint: add --rule <rule package name> option (af1e1b9)
textlint - improve error reporter

Published by azu over 9 years ago

feat(textlint): improve error report · 53c5909 · azu/textlint

RuleError:

  • Change RuleError constructor 2nd arguments.
  • 2nd arg is paddingLocation.
  • paddingLocation has line and column
context.report(node, new context.RuleError(result.actual + " => " + result.expected, {
     line: result.paddingLine,
     column: result.paddingColumn
}));

Example:

1st line
2nd abc ERROR def

I want to find ERROR, come to be following:

context.report(node, new context.RuleError("found Error", {
     line: 1,// padding line number
     column: 8// padding column number
}));

use-case : feat(rule): improve linting result · 64fcd7d · azu/spellcheck-tech-word-textlint-rule

textlint - 3.0.0

Published by azu over 9 years ago

Update

  • update markdown-to-ast to 3.0

use mdast instead of CommonMark by azu · Pull Request #3 · azu/markdown-to-ast

Breaking Changes

markdown-to-ast 3.0.0 has some breaking changes.

use mdast instead of CommonMark

Break CommonMark dependent.
If you have used CommonMark-dependent code, it may be broken.

CodeBlock Node

before:

CodeBlock.raw have not contain CodeBlock mark like ```

var code = 1;

after:

CodeBlock.raw have contain CodeBlock mark like ```

The raw value of CodeBlock node is following:

```
var code = 1;
```

if you want to get only code value, can get from node.vaule.

Alt text of Image Node

before(CommonMark):

Alt text of Image node is Str node.

after(mdast):

Alt text of Image node is not Str node.
It is true that Alt text is a attribute of Image Node.

textlint -

Published by azu almost 10 years ago

2.0.0 (2015-01-12)

Breaking Change!

Rename CLIEngine to TextLintEngine

  • Difference between CLIEngine and TextLintEngine is arguments of constructor.

Update document and please see docs/use-as-modules.md.

Usage:

"use strict";
var TextLintEngine = require("textlint").TextLintEngine;
var path = require("path");
function lintFile(filePath) {
    /**
     * @type {TextLintConfig}
     * See lib/_typing/textlint.d.ts
     */
    var options = {
        // load rules from [../rules]
        rulePaths: [path.join(__dirname, "..", "rules/")],
        formatterName: "pretty-error"
    };
    var engine = new TextLintEngine(options);
    var filePathList = [path.resolve(process.cwd(), filePath)];
    var results = engine.executeOnFiles(filePathList);
    if (engine.isErrorResults(results)) {
        var output = engine.formatResults(results);
        console.log(output);
    }
}

Bug Fixes

Features

  • cli-engine: cli-engine accept config object. (e9e914ae)
textlint -

Published by azu almost 10 years ago

1.4.2 (2015-01-05)

Bug Fixes

  • textlint: fix message bug during linting multiple files (201f729d)

Fixed the bug that duplicate error message.

img

textlint - new parser: 1.4.0

Published by azu almost 10 years ago

1.4.0 (2015-01-05)

Features

  • markdown: update markdown-to-ast ver2 (f682d9f7)
  • parser: use new text parser (09ef2d50)
  • textlint: change traverse rule completely (5aaaa880)

Docs

Update TxtNode interface and Creating Rules.

textlint -

Published by azu almost 10 years ago

1.3.0 (2015-01-02)

Bug Fixes

  • rule-context: use union-syntax instead of markdown-syntax (385ed4d0)

Features

  • markdown: Carve out parse/markdown to module (6b310fae) #4

We use azu/markdown-to-ast as markdown parser module, now!
(It's based on CommonMarkdown)

It make context.getSource() more correct!