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 over 8 years ago

Features

  • Don't load duplicated rule with ruleConfig Issue #219

See https://github.com/textlint/textlint/blob/master/docs/rule.md#implementation-node-memo for details.

  • RuleCreatorSet: add #withoutDuplicated()(812b13e)
  • task: use ruleCreatorSet#withoutDuplicated() for filtering duplicated rule(261d90f)
textlint -

Published by azu over 8 years ago

--experimental Features

These features are experimental

You can use it with --experimental flag

$ textlint --experimental
  • filter: add filter-duplicated-process (#217)(bb87855)

Duplicated messages is ignored by default.
Duplicated messages is that have same position information(index) and same message.

  • filter: re-enable sort messages by line and column (#218)(385a82c)
textlint -

Published by azu over 8 years ago

semi-Breaking change

Proposal #212 and implement #214

Support "filters" field and Drop support "ignoring-rule"
These are experimental feature. 🚧

See filter rule document for details.

{
   "filters": {
      "node-types": {
        "nodeTypes": ["BlockQuote"]
      }
   },
   "rules": {}
}

Features

internal

  • Added MessageProcessManager.
  • This manager process TextLintMessages.
  • Main usecase filter messages.
textlint -

Published by azu over 8 years ago

Features

  • ignore: add { ruleId } option object to shouldIgnore (#208) (de0ff6f)

When the ruleId of option object is matched ruleId of error message, filter only the message,
Default is filter all message in the ignoring range.

UseCase

https://github.com/textlint/textlint-rule-ignore-comment

<!-- textlint-disable ruleA -->

this is wrong

<!-- textlint-enable -->

Disable specific rule on the fly.

Breaking Change(experimental)

shouldIgnore(range) only ignore messages of the ruleId.

It means that shouldIgnore(range) === shouldIgnore(range, { ruleId : this.id }).
It attempt to make safe by default.

"*" is danger because "*" affect to other rules.

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

Published by azu over 8 years ago

Features

  • node: add "Comment" type (#205) (640f84d), closes #204

Performance Improvements

  • test: run example tests by foreman (#206) (cc9e489)
textlint -

Published by azu over 8 years ago

Features

  • change shouldIgnore(range) API #203

Previously, ignoring api is shouldIgnore(<node>). #194

But, I think that shouldIgnore([start, end]) is better.
Because, ignoring rule is not always depended on .
It always depended on <range> which is like [number, number].

This change is breaking change, but ignoring feature is experimental support.
As as result, we have published as minor version.

Fix: #202
Refs: #193

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

Published by azu over 8 years ago

Bug Fixes

  • npm: fix "files" fileld (264c867)
textlint -

Published by azu over 8 years ago

Features

  • index: export TextLintNodeType as TextLintNodeType (f6c1e61)

You can use this TextLintNodeType value by the following way:

import {TextLintNodeType} from "textlint";
console.log(TextLintNodeType.Str); // "Str"

Please see https://github.com/textlint/textlint/blob/master/docs/txtnode.md

textlint -

Published by azu over 8 years ago

Features

Ignore rule is experimental. It used with --experimental.

Please see https://github.com/textlint/textlint/blob/master/docs/rule.md

  • context.shouldIgnore(node) 🆕
textlint -

Published by azu over 8 years ago

Features

  • core: add fileName to trailing of error message (bd1f454), closes #165

Show where the error is occurring.

When throw error in the rule.

module.exports = function (context) {
    var exports = {};
    exports[context.Syntax.Str + ":exit"] = function () {
        throw new Error("Error in rule");
    };
    return exports;
};

Before:

Error in rule

After:

Error in rule at ~/textlint/textlint/test/rule-context/fixtures/test.md
  • core: always start asynchronous (3ef2a62), closes #178
textlint -

Published by azu over 8 years ago

Features

  • config: --config @textlint/textlint-config support (a059df7)

See Sharable Configuration for details.

Example : azu/textlint-config-readme: Sharable config for textlint

You can use the config via two step.

npm i -D @azu/textlint-config-readme textlint
$(npm bin)/textlint --config @azu/textlint-config-readme README.md
textlint - https://github.com/textlint/textlint/releases/tag/6.1.1

Published by azu over 8 years ago

textlint - reverted

Published by azu over 8 years ago

Features

  • core: sort messages by line and column (9b2b400), closes #126

EDIT It is reverted and released 6.1.1.

https://github.com/textlint/textlint/commit/3651f9df61738d1ab49752885138cf436d8675e5
https://github.com/textlint/textlint/commit/106da2f7fa8ae927266df346cbbc89759417c6f7

This change break some test case that has a implementation dependent.

Bug Fixes

  • JSDoc: fix jSDoc using jsdoc-to-assert (3082435)
  • plugin: fix 3rd party plugin is not working (0fae5bc), closes #180
  • config: Config's extensions can include plugin's availableExtensions. (98fb11d)
textlint - 6.0.4: 3rd party plugins doesn't work

Published by azu over 8 years ago

Fixes

  • 3rd party plugins doesn't work #180 #181

e.g.) https://github.com/textlint/textlint-plugin-html

When load a plugin, then textlint take cognizance available extensions like ".html".
But, textlint v6.0.3 could not add the additional extension to engine.availableExtensions.
As as result, alway passed! It is wrong.

textlint - 6.0.3: Fix problems installing

Published by azu over 8 years ago

Summary of Breaking

@azer has unpublished all his npm module.

textlint-formatter depened on his modules.

We have fixed ths issue and patch release.

Bug Fixes

  • npm: fix installing of textlint (81cb2c4)
textlint -

Published by azu over 8 years ago

Features

  • d.t.s: Add TextLintRuleContext to textlint.d.ts (df2cb9d), closes #171
  • source-location: improve error message (0b1a792)

Docs

TxtNode/TxtAST #170

textlint - 6.0: --fix to be stable

Published by azu over 8 years ago

Breaking Change

These changes won't affect user.

  • Remove TextLintEngine#setRulesBaseDirectory

Please use

new TextLintEngine({
 rulesBaseDirectory: directory
});
  • Remove --experimental flag from --fix

TextLintEngine#fixFiles(files) and TextLintEngine# fixText(text, ext = ".txt") have been removed at 6.0.
It was introduced at 5.5.3: --fix & --experimental support.

After hard refactoring, TextLintEngine was split to TextFixEngine and TextLintEngine.

Please use TextFixEngine instead of above method.

  • TextFixEngine#executeOnFiles(files): TextLintFixResult[]
  • TextFixEngine#executeOnText(text, evt): TextLintFixResult[]

Features

--fix

textlint 5.5~ introduces the --fix command line argument to automatically fix some rules.

$ textlint --fix README.md
# fixed by each rule

Lint: textlint README.md

javascript-plugin-architecture zsh 2016-03-18 12-08-18

Fix: textlint --fix --dry-run -f diff README.md with dry-run mode

javascript-plugin-architecture zsh 2016-03-18 12-07-19

Actually Fix: textlint --fix README.md

📝

Not all rules is fixable.
So, it is difficult that make all rules fixable.

What are rules fixable?

textlint rule

You check textlint/textlint Wiki also.

How to create fixable rule?

ℹ️ Please See Creating fixable rule for detail.

How to test the rule

Please use textlint-tester.

textlint -

Published by azu over 8 years ago

Breaking Change(near internal)

  • #161
textlint - 6.0.0 beta-0

Published by azu over 8 years ago

This is beta release of 6.0

Please test it!

npm i -D textlint@beta

Please see textlint 6.0 · Issue #145 · textlint/textlint

Bug Fixes

  • config: fix config-initializer test (9935b90)
  • fixer: fix lint error (884f502)
  • rule-context: the default severity should always be error (02425ea), closes #144

Features

  • cli: add --dry-run (9aef49f)
  • core: add Core#setupProcessors (76ad42e)
  • fixer: --fix to be stable (5134c22)
  • fixer: add -f diff formatter (77ddf06)
  • fixer: add fixable stylish formatter (bcce3d8)
  • fixer: add formatter creator (52edc5f)
  • fixer: add textfix-engine ! (ae6aacc)

Reverts

textlint -

Published by azu over 8 years ago

Bug Fixes

Features

--format stylish and --format pretty-error show _fixable problem_s.

fix zsh 2016-03-09 22-52-47