textlint/textlint
### [`v12.6.1`](https://togithub.com/textlint/textlint/releases/tag/v12.6.1)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.6.0...v12.6.1)
#### What's Changed
##### Refactoring
- refactor(kernel): remove node:events by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/1003](https://togithub.com/textlint/textlint/pull/1003)
##### Dependency Updates
- chore(deps): update eslint to ^5.48.2 (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/1006](https://togithub.com/textlint/textlint/pull/1006)
**Full Changelog**: https://github.com/textlint/textlint/compare/v12.6.0...12.6.1
### [`v12.6.0`](https://togithub.com/textlint/textlint/releases/tag/v12.6.0)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.5.2...v12.6.0)
#### What's Changed
##### Features
- feat(kernel): report plugin parse error as lint error by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/986](https://togithub.com/textlint/textlint/pull/986)
##### Bug Fixes
- chore(kernel): fix typo by [@Sean0628](https://togithub.com/Sean0628) in [https://github.com/textlint/textlint/pull/991](https://togithub.com/textlint/textlint/pull/991)
##### Refactoring
- refactor: update to structured-source@4 by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/984](https://togithub.com/textlint/textlint/pull/984)
- refactor(kernel): replace assert with invariant function by [@Sean0628](https://togithub.com/Sean0628) in [https://github.com/textlint/textlint/pull/990](https://togithub.com/textlint/textlint/pull/990)
##### Dependency Updates
- fix(deps): update dependency rc-config-loader to ^4.1.2 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/981](https://togithub.com/textlint/textlint/pull/981)
- chore(deps): update dependency [@textlint/types](https://togithub.com/textlint/types) to ^12.3.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/982](https://togithub.com/textlint/textlint/pull/982)
- chore(deps): update eslint to ^5.48.0 (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/987](https://togithub.com/textlint/textlint/pull/987)
- chore(deps): update dependency eslint-config-prettier to ^8.6.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/988](https://togithub.com/textlint/textlint/pull/988)
- chore(deps): update dependency [@textlint/types](https://togithub.com/textlint/types) to ^12.5.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/992](https://togithub.com/textlint/textlint/pull/992)
- fix(deps): update dependency [@babel/core](https://togithub.com/babel/core) to ^7.20.12 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/993](https://togithub.com/textlint/textlint/pull/993)
- chore(deps): update patch updates (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/997](https://togithub.com/textlint/textlint/pull/997)
- chore(deps): update dependency lerna to ^6.4.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/995](https://togithub.com/textlint/textlint/pull/995)
- chore(deps): update dependency lerna to ^6.4.1 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/999](https://togithub.com/textlint/textlint/pull/999)
- chore(deps): update eslint to ^5.48.1 (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/998](https://togithub.com/textlint/textlint/pull/998)
**Full Changelog**: https://github.com/textlint/textlint/compare/v12.5.1...12.6.0
### [`v12.5.2`](https://togithub.com/textlint/textlint/releases/tag/v12.5.2)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.5.0...v12.5.2)
#### What's Changed
##### Features
- feat(kernel): report plugin parse error as lint error by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/986](https://togithub.com/textlint/textlint/pull/986)
##### Bug Fixes
- chore(kernel): fix typo by [@Sean0628](https://togithub.com/Sean0628) in [https://github.com/textlint/textlint/pull/991](https://togithub.com/textlint/textlint/pull/991)
##### Refactoring
- refactor: update to structured-source@4 by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/984](https://togithub.com/textlint/textlint/pull/984)
- refactor(kernel): replace assert with invariant function by [@Sean0628](https://togithub.com/Sean0628) in [https://github.com/textlint/textlint/pull/990](https://togithub.com/textlint/textlint/pull/990)
##### Dependency Updates
- fix(deps): update dependency rc-config-loader to ^4.1.2 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/981](https://togithub.com/textlint/textlint/pull/981)
- chore(deps): update dependency [@textlint/types](https://togithub.com/textlint/types) to ^12.3.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/982](https://togithub.com/textlint/textlint/pull/982)
- chore(deps): update eslint to ^5.48.0 (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/987](https://togithub.com/textlint/textlint/pull/987)
- chore(deps): update dependency eslint-config-prettier to ^8.6.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/988](https://togithub.com/textlint/textlint/pull/988)
- chore(deps): update dependency [@textlint/types](https://togithub.com/textlint/types) to ^12.5.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/992](https://togithub.com/textlint/textlint/pull/992)
- fix(deps): update dependency [@babel/core](https://togithub.com/babel/core) to ^7.20.12 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/993](https://togithub.com/textlint/textlint/pull/993)
- chore(deps): update patch updates (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/997](https://togithub.com/textlint/textlint/pull/997)
- chore(deps): update dependency lerna to ^6.4.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/995](https://togithub.com/textlint/textlint/pull/995)
- chore(deps): update dependency lerna to ^6.4.1 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/999](https://togithub.com/textlint/textlint/pull/999)
- chore(deps): update eslint to ^5.48.1 (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/998](https://togithub.com/textlint/textlint/pull/998)
**Full Changelog**: https://github.com/textlint/textlint/compare/v12.5.1...12.5.2
### [`v12.5.0`](https://togithub.com/textlint/textlint/releases/tag/v12.5.0)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.4.0...v12.5.0)
##### Features
- add `--format=fixed-result` option to fixer format ([755dba5](https://togithub.com/textlint/textlint/commit/755dba58ce058c77b794e43a8f7522550a763437)), closes [#967](https://togithub.com/textlint/textlint/issues/967) by [@Sean0628](https://togithub.com/Sean0628) in [https://github.com/textlint/textlint/pull/978](https://togithub.com/textlint/textlint/pull/978)
Example:
```bash
$ cat README.md | npx textlint --stdin --stdin-filename README.md --fix --format fixed-result --output-file NEW.md
```
For more details, see
#### New Contributors
- [@Sean0628](https://togithub.com/Sean0628) made their first contribution in [https://github.com/textlint/textlint/pull/978](https://togithub.com/textlint/textlint/pull/978)
**Full Changelog**: https://github.com/textlint/textlint/compare/v12.4.0...v12.5.0
### [`v12.4.0`](https://togithub.com/textlint/textlint/releases/tag/v12.4.0)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.3.1...v12.4.0)
##### Features
- **textlint:** add --print-config flag ([9aa400f](https://togithub.com/textlint/textlint/commit/9aa400f01a073389b14740bbd32cd6e23a436785))
#### What's Changed
- refactor(textlint-test): use [@textlint/kernel](https://togithub.com/textlint/kernel) by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/974](https://togithub.com/textlint/textlint/pull/974)
- feat(textlint): add --print-config flag for New CLI by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/975](https://togithub.com/textlint/textlint/pull/975)
**Full Changelog**: https://github.com/textlint/textlint/compare/v12.3.1...v12.4.0
### [`v12.3.1`](https://togithub.com/textlint/textlint/releases/tag/v12.3.1)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.3.0...v12.3.1)
##### Bug Fixes
- **deps:** update babel monorepo to ^7.20.7 ([30a1386](https://togithub.com/textlint/textlint/commit/30a13866872dc226bc9eb5e996f7fb04676b3ced))
- **textlint:** fix ESM loading issue on Windows ([#972](https://togithub.com/textlint/textlint/issues/972)) ([a6b9bf5](https://togithub.com/textlint/textlint/commit/a6b9bf56d2c792e199276b573aea1a490962670c))
### [`v12.3.0`](https://togithub.com/textlint/textlint/releases/tag/v12.3.0)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.2.4...v12.3.0)
##### Features
- **monorepo:** upgrade to lerna@6 and use NX ([#964](https://togithub.com/textlint/textlint/issues/964)) ([e372795](https://togithub.com/textlint/textlint/commit/e372795a5f53794e6f383292e01f66858b8249ad))
- **textlint:** add new APIs and new CLI for ESM ([#965](https://togithub.com/textlint/textlint/issues/965)) ([3be8e39](https://togithub.com/textlint/textlint/commit/3be8e39f9fa8e4b5e89c40d2d0b6fbb0297a0601))
#### Overview
- Support Rules/Filter/Pluugins that are written in ECMAScript Modules
- Add new CLI
- Add new APIs: `createLinter`/`loadTextlintrc`/`loadLinterFormatter`/`loadFixerFormatter`
- It will replace `TextLintCore`/`TextFixEngine`/`TextLintEngine`
📝 ESM Rules/Filter/Pluugins only works in `createLinter` API.
This is because `TextLintCore`/`TextFixEngine`/`TextLintEngine` were assumed to be synchronous processes.
`createLinter` API does loading as async.
#### Breaking Changes
No changes in existing CLI.
#### Difference between Old-CLI and New-CLI
- New CLI support ESM
- New CLI must require `--stdin-filename` with `--stdin`
- `--stdin-filename` may be optional in Old-CLI
- Correct exit status
##### Exit Status on new CLI
`0`: No Error
- Not found lint error
- \--fix: found errors but fix all errors, so exit with 0
- \--output-file: Found lint error but --output-file is specified
- \--dryRun: Found lint error but --dryRun is specified
`1`: Lint Error
- found lint error
- \--fix: found errors and could not fix all errors, so exit with 1
`2`: Fatal Error
- Crash textlint process
- Fail to load config/rule/plugin etc...
-
#### New APIs
Ww introduce new API like `createLinter` for supporting Async APIs.
v13 continue to support current `TextLintEngine` and `TextFixEngine` for backward compatible.
- [#902](https://togithub.com/textlint/textlint/issues/902)
New `createLinter` and `loadTextlintrc` support ESM rules/plugins.
In other hands, `TextLintEngine` and `TextFixEngine` can not support ESM rules/plugins.
https://github.com/textlint/textlint/blob/60cea514f7eaefbff4411087d16a51daf68f12a4/packages/textlint/src/index.ts
| API | Description | Behavior | Target Platform | Prev Status | Next Status |
| --- | --- | --- | --- | --- | --- |
| cli | Command LIne Interface | Async | Node.js | ✅ | ✅ (Use createTextlint internally) |
| textlint | TextLintCore alias | Async | Node.js/CommonJS | ❌ Deprecated | ❌ Deprecated |
| TextLintCore | Old API. It is Procedural API. Lint Only Single File. Recommended to use [@texltint/kernel](https://togithub.com/texltint/kernel) module instead of It. | Async | Node.js/CommonJS | ❌ Deprecated | ❌ Deprecated |
| TextLintEngine | Lint Engine API. It load .textlintrc automaticaly | ◉ Loading is Sync ◉ Linting is Async | Node.js/CommonJS | ✅ Recommended | ❌ Deprecated |
| TextFixEngine | Fix Engine API. It load .textlintrc automaticaly | ◉ Loading is Sync ◉ Fixing is Async | Node.js/CommonJS | ✅ Recommended | ❌ Deprecated |
| createLinter/loadTextlintrc | Support Async APIs. | ◉ Loading is Async ◉ Linting/Fixing is Async | Node.js/CommonJS and ESM | None | ✅ Recommended |
- `createLinter`: create linter instance
- `lintFiles(files)`: lint files and return linter messages
- `lintText(text, filePath)` lint text with virtual filePath and return linter messages
- `fixFiles(files` lint text and return fixer messages
- `fixText(text, filePath)` lint text with virtual filePath and return fixer messages
- `fixFiles` and `fixText` does not modify files
- `loadTextlintrc`: load `.textlintrc` config file and return a descriptor object
- `loadLinerFormatter` and `loadFixerFormatter`: load formatter
Lint files and output to console.
```ts
import { createLinter, loadTextlintrc, loadLinterFormatter } from "textlint";
// descriptor is a structure object for linter
// It includes rules, plugins, and options
const descriptor = await loadTextlintrc();
const linter = createLinter({
descriptor
});
const results = await linter.lintFiles(["*.md"]);
// textlint has two types formatter sets for linter and fixer
const formatter = await loadLinterFormatter({ formatterName: "stylish" })
const output = formatter.format(results);
console.log(output);
```
For more details, see
#### How to use New CLI
New CLI is opt-in for avoiding Breaking Changes.
It will be default in next major version.
You can try new textlint CLI via `textlint-esm` command.
```diff
- $ textlint "**/*.md"
+ $ textlint-esm "**/*.md"
```
Or, when `TEXTLINT_USE_NEW_CLI=1` is set, textlint use new CLI
```bash
$ TEXTLINT_USE_NEW_CLI=1 textlint "**/*.md"
```
🔥 Welcome to feedback on Discussion: [https://github.com/textlint/textlint/discussions/968](https://togithub.com/textlint/textlint/discussions/968)
fix [#868](https://togithub.com/textlint/textlint/issues/868)
fix [https://github.com/textlint/textlint/issues/744](https://togithub.com/textlint/textlint/issues/744) - new CLI fix this
fix [https://github.com/textlint/textlint/issues/103](https://togithub.com/textlint/textlint/issues/103) - new CLI fix this
fix [#797](https://togithub.com/textlint/textlint/issues/797) - extends `descriptor` instead of `Config`
fix [#293](https://togithub.com/textlint/textlint/issues/293) - `TextlintCore` will be removed in the future
### [`v12.2.4`](https://togithub.com/textlint/textlint/releases/tag/v12.2.4)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.2.3...v12.2.4)
##### Bug Fixes
- **deps:** update babel monorepo to ^7.20.2 ([4f0364a](https://togithub.com/textlint/textlint/commit/4f0364a371d1f2ab4a89ce073f8ce45aa9c07d41))
- **deps:** update dependency [@babel/cli](https://togithub.com/babel/cli) to ^7.19.3 ([c7124c6](https://togithub.com/textlint/textlint/commit/c7124c69cfcd1f9544b77bc815d9046b387551e7))
- **textlint:** support linting dot files ([#947](https://togithub.com/textlint/textlint/issues/947)) ([8811922](https://togithub.com/textlint/textlint/commit/8811922eb556bd50f2c59ed87c96476a44bd848e)) by [@kellyselden](https://togithub.com/kellyselden)
This release allow to lint dot file when setting dot file name for `extensions`.
```js
{
plugins: {
'@textlint/text': {
extensions: ['.lint-todo'],
},
}
rules: {
'eol-last': true,
}
};
```
This version can lint `.lint-todo` file.
```shell
npx textlint .lint-todo
```
### [`v12.2.3`](https://togithub.com/textlint/textlint/releases/tag/v12.2.3)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.2.2...v12.2.3)
##### Bug Fixes
- **deps:** update babel monorepo to ^7.19.1 ([6a0dbb8](https://togithub.com/textlint/textlint/commit/6a0dbb8d8b109de91c41057aefa6e91fa941dda2))
- **deps:** update babel monorepo to ^7.19.3 ([e5c80eb](https://togithub.com/textlint/textlint/commit/e5c80ebb5416b6b13071583320e144b056345287))
- **deps:** update dependency [@babel/core](https://togithub.com/babel/core) to ^7.19.6 ([3ba99ea](https://togithub.com/textlint/textlint/commit/3ba99eafe4a80478966f0ab2622b7a2d18cdd513))
- **deps:** update dependency [@babel/preset-env](https://togithub.com/babel/preset-env) to ^7.19.4 ([d1049bd](https://togithub.com/textlint/textlint/commit/d1049bd916cabd79d088b0596a72026198ecc0b3))
- **deps:** update dependency table to ^6.8.1 ([abcb864](https://togithub.com/textlint/textlint/commit/abcb86445f0532f31209043af91e4e00942be77c))
- **deps:** update dependency traverse to ^0.6.7 ([fc0ea91](https://togithub.com/textlint/textlint/commit/fc0ea9161e42fc4c6e55afc7b1438bb3373cd172))
- **linter-formatter:** added lodash to dependencies ([#934](https://togithub.com/textlint/textlint/issues/934)) ([e97efb8](https://togithub.com/textlint/textlint/commit/e97efb83c6364a864dba108434446d30d203545c))
- **types:** expose TextlintPluginPreProcessResult/TextlintPluginPostProcessResult type [#920](https://togithub.com/textlint/textlint/issues/920) ([49d990a](https://togithub.com/textlint/textlint/commit/49d990af70c157612f2a39a3a04959c5de999b65))
### [`v12.2.2`](https://togithub.com/textlint/textlint/releases/tag/v12.2.2)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.2.1...v12.2.2)
##### Bug Fixes
- **markdown-to-ast:** add `mdast-util-gfm-autolink-literal` to explicit deps ([#904](https://togithub.com/textlint/textlint/issues/904)) ([d2888a5](https://togithub.com/textlint/textlint/commit/d2888a53e655b2d8f9310aba57306abf0352edbe))
This will fix pnpm issue [#903](https://togithub.com/textlint/textlint/issues/903)
##### Dependencies Updates
- **deps:** update babel monorepo to ^7.18.10 ([dc0c555](https://togithub.com/textlint/textlint/commit/dc0c5556bbd8f1bfb5b649b26536b6095c3ea0b3))
- **deps:** update babel monorepo to ^7.18.6 ([d8e30ae](https://togithub.com/textlint/textlint/commit/d8e30aeea1f047af3d6658e62d9e3761b873866c))
- **deps:** update babel monorepo to ^7.18.6 ([0f1b0fb](https://togithub.com/textlint/textlint/commit/0f1b0fb8a500423e96fe5e69a081ed04bae64457))
- **deps:** update babel monorepo to ^7.18.9 ([558b4ee](https://togithub.com/textlint/textlint/commit/558b4ee517e901f203cfe61e80cc2aa3f8873294))
- **deps:** update dependency [@babel/core](https://togithub.com/babel/core) to ^7.18.13 ([5c3ac1b](https://togithub.com/textlint/textlint/commit/5c3ac1bcad430de42f588a2cf94325eb89371447))
- **deps:** update dependency [@babel/core](https://togithub.com/babel/core) to ^7.18.5 ([17ab0d4](https://togithub.com/textlint/textlint/commit/17ab0d46b9f89499428dd49f631f222870022107))
### [`v12.2.1`](https://togithub.com/textlint/textlint/releases/tag/v12.2.1)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.2.0...v12.2.1)
#### What's Changed
- fix(textlint/kernel): improve RuleError error handlong by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/877](https://togithub.com/textlint/textlint/pull/877)
**Full Changelog**: https://github.com/textlint/textlint/compare/v12.1.0...v12.2.1
### [`v12.2.0`](https://togithub.com/textlint/textlint/releases/tag/v12.2.0)
[Compare Source](https://togithub.com/textlint/textlint/compare/v12.1.1...v12.2.0)
#### Features
Implement Improve error location RFC [#835](https://togithub.com/textlint/textlint/issues/835)
It will make the error location more details.
This change is for rule developer.
- Add `loc` and `range` property to `TextlintMessage`(result)
- Add `padding` prorperty to `RuleError(message, details)`.
- Add `locator` object to rule's context
- `lcoator.at(index)`, `locator.range([startIndex, endIndex])`, and `locator.loc({ start: { line, column }, end: { line, column }})`.
- textlint-tester's `valid` and `invalid` support `range` property
- Deprecate `index`, `line` and `column` property on `TextlintMessage` and `report` function
- Preserve current behavior for backward compatible
- Update `filterMessages` to use new `range` property on `TextlintMessage`
- Use `readonly [number, number]` as range in all packages
- Fix `filterMessages` bug [https://github.com/textlint/textlint/pull/836](https://togithub.com/textlint/textlint/pull/836)/commits/c8a670f9b4fd7ce628a940dc4c8faabd5e62d396
- Refactor tests
- Update rule.md documentation
- Add `padding` and `locator` object
- Add `peerDependencies` note
textlint v12.2.0 will introduce `padding` and `locator`.
If your will use it, please add `peerDependencies` to `package.json` on your rule package.
```json5
"peerDependencies": {
"textlint": ">= 12.2.0"
},
"peerDependenciesMeta": {
"textlint": {
"optional": true
}
}
```
#### For textlint rule creator
Before:
```js
const { Syntax, report, RuleError } = context;
// .....
report(node, new RuleError(message, {
index: 1
}));
```
After:
```js
const { Syntax, report, RuleError, locator } = context;
// .....
report(node, new RuleError(message, {
padding: locator.at(1)
}));
```
If you want to get more correct location, please use `locator.range` or `locator.loc`
```js
const { Syntax, report, RuleError, locator } = context;
// .....
report(node, new RuleError(message, {
padding: locator.range([1, 5]) // The error related to 1 - 5 index.
}));
```
For more details, see https://textlint.github.io/docs/rule.html#ruleerror
- [#835](https://togithub.com/textlint/textlint/issues/835)
#### Changelogs
##### Bug Fixes
- **deps:** update babel monorepo ([89b2395](https://togithub.com/textlint/textlint/commit/89b2395487649a711e93aa8790dea89e8b65dc39))
- **deps:** update babel monorepo ([6a3e841](https://togithub.com/textlint/textlint/commit/6a3e841f345f6334c23871a0e4d8a8cd68590fad))
- **deps:** update babel monorepo ([a91e594](https://togithub.com/textlint/textlint/commit/a91e5946f29a1ab5cf6478a7e1a575254c3dcfb1))
- **deps:** update babel monorepo ([c9f1957](https://togithub.com/textlint/textlint/commit/c9f195786a6a3f21b5d009425fb92e33126ab849))
- **deps:** update babel monorepo to ^7.16.5 ([#834](https://togithub.com/textlint/textlint/issues/834)) ([dcbc196](https://togithub.com/textlint/textlint/commit/dcbc1965d4039b4000b4d99b3d55e851ddd7b31c))
- **deps:** update babel monorepo to ^7.16.7 ([e8c10aa](https://togithub.com/textlint/textlint/commit/e8c10aa9458e35e82c6ff835e4f398dbf5fb617e))
- **deps:** update babel monorepo to ^7.17.10 ([1539f0a](https://togithub.com/textlint/textlint/commit/1539f0aa2651e50315dff5cf8ab9f18c5b798996))
- **deps:** Update chalk ([#842](https://togithub.com/textlint/textlint/issues/842)) ([56ba52c](https://togithub.com/textlint/textlint/commit/56ba52c007553f3e72adcf32cc191f6b7ca5d799))
- **deps:** update dependency [@babel/core](https://togithub.com/babel/core) to ^7.17.12 ([add5313](https://togithub.com/textlint/textlint/commit/add531307d0810be4cfd266f8758aa0d45b4c845))
- **deps:** update dependency [@babel/core](https://togithub.com/babel/core) to ^7.17.9 ([db74d3a](https://togithub.com/textlint/textlint/commit/db74d3a874cb393555d3f678f32387a635cfe63c))
- **deps:** update dependency [@babel/core](https://togithub.com/babel/core) to ^7.18.2 ([73c2047](https://togithub.com/textlint/textlint/commit/73c20472745dffbe50c65b00fe4884c55399cbf6))
- **deps:** update dependency table to ^6.7.5 ([fdfcce6](https://togithub.com/textlint/textlint/commit/fdfcce68a37f1d1bee11de2757815fcc2bf749f4))
- **deps:** update dependency table to ^6.8.0 ([5e1aa18](https://togithub.com/textlint/textlint/commit/5e1aa18a1d4d7ed8f87c07965c949afa9ddaa194))
- **deps:** Update packages that depend on ansi-regex ([#841](https://togithub.com/textlint/textlint/issues/841)) ([17c03cd](https://togithub.com/textlint/textlint/commit/17c03cd1327cba41eba5db97332ffed4583b32a4))
- **deps:** Update string-width ([#844](https://togithub.com/textlint/textlint/issues/844)) ([675bc93](https://togithub.com/textlint/textlint/commit/675bc9345caaa78343f27addb004dc7bd04e4938))
- **textlint:** remove log-symbols ([#845](https://togithub.com/textlint/textlint/issues/845)) ([000d07a](https://togithub.com/textlint/textlint/commit/000d07ac87449651bff8dd6f85fabd021d18a2e0))
##### Features
- **textlint:** add `padding` property and `locator` ([#836](https://togithub.com/textlint/textlint/issues/836)) ([f94d5f8](https://togithub.com/textlint/textlint/commit/f94d5f8a421357648ab7c2f3755b93a1bf3e793c))
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^12.1.1
->^12.6.1
^12.1.1
->^12.6.1
Release Notes
textlint/textlint
### [`v12.6.1`](https://togithub.com/textlint/textlint/releases/tag/v12.6.1) [Compare Source](https://togithub.com/textlint/textlint/compare/v12.6.0...v12.6.1) #### What's Changed ##### Refactoring - refactor(kernel): remove node:events by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/1003](https://togithub.com/textlint/textlint/pull/1003) ##### Dependency Updates - chore(deps): update eslint to ^5.48.2 (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/1006](https://togithub.com/textlint/textlint/pull/1006) **Full Changelog**: https://github.com/textlint/textlint/compare/v12.6.0...12.6.1 ### [`v12.6.0`](https://togithub.com/textlint/textlint/releases/tag/v12.6.0) [Compare Source](https://togithub.com/textlint/textlint/compare/v12.5.2...v12.6.0) #### What's Changed ##### Features - feat(kernel): report plugin parse error as lint error by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/986](https://togithub.com/textlint/textlint/pull/986) ##### Bug Fixes - chore(kernel): fix typo by [@Sean0628](https://togithub.com/Sean0628) in [https://github.com/textlint/textlint/pull/991](https://togithub.com/textlint/textlint/pull/991) ##### Refactoring - refactor: update to structured-source@4 by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/984](https://togithub.com/textlint/textlint/pull/984) - refactor(kernel): replace assert with invariant function by [@Sean0628](https://togithub.com/Sean0628) in [https://github.com/textlint/textlint/pull/990](https://togithub.com/textlint/textlint/pull/990) ##### Dependency Updates - fix(deps): update dependency rc-config-loader to ^4.1.2 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/981](https://togithub.com/textlint/textlint/pull/981) - chore(deps): update dependency [@textlint/types](https://togithub.com/textlint/types) to ^12.3.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/982](https://togithub.com/textlint/textlint/pull/982) - chore(deps): update eslint to ^5.48.0 (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/987](https://togithub.com/textlint/textlint/pull/987) - chore(deps): update dependency eslint-config-prettier to ^8.6.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/988](https://togithub.com/textlint/textlint/pull/988) - chore(deps): update dependency [@textlint/types](https://togithub.com/textlint/types) to ^12.5.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/992](https://togithub.com/textlint/textlint/pull/992) - fix(deps): update dependency [@babel/core](https://togithub.com/babel/core) to ^7.20.12 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/993](https://togithub.com/textlint/textlint/pull/993) - chore(deps): update patch updates (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/997](https://togithub.com/textlint/textlint/pull/997) - chore(deps): update dependency lerna to ^6.4.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/995](https://togithub.com/textlint/textlint/pull/995) - chore(deps): update dependency lerna to ^6.4.1 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/999](https://togithub.com/textlint/textlint/pull/999) - chore(deps): update eslint to ^5.48.1 (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/998](https://togithub.com/textlint/textlint/pull/998) **Full Changelog**: https://github.com/textlint/textlint/compare/v12.5.1...12.6.0 ### [`v12.5.2`](https://togithub.com/textlint/textlint/releases/tag/v12.5.2) [Compare Source](https://togithub.com/textlint/textlint/compare/v12.5.0...v12.5.2) #### What's Changed ##### Features - feat(kernel): report plugin parse error as lint error by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/986](https://togithub.com/textlint/textlint/pull/986) ##### Bug Fixes - chore(kernel): fix typo by [@Sean0628](https://togithub.com/Sean0628) in [https://github.com/textlint/textlint/pull/991](https://togithub.com/textlint/textlint/pull/991) ##### Refactoring - refactor: update to structured-source@4 by [@azu](https://togithub.com/azu) in [https://github.com/textlint/textlint/pull/984](https://togithub.com/textlint/textlint/pull/984) - refactor(kernel): replace assert with invariant function by [@Sean0628](https://togithub.com/Sean0628) in [https://github.com/textlint/textlint/pull/990](https://togithub.com/textlint/textlint/pull/990) ##### Dependency Updates - fix(deps): update dependency rc-config-loader to ^4.1.2 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/981](https://togithub.com/textlint/textlint/pull/981) - chore(deps): update dependency [@textlint/types](https://togithub.com/textlint/types) to ^12.3.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/982](https://togithub.com/textlint/textlint/pull/982) - chore(deps): update eslint to ^5.48.0 (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/987](https://togithub.com/textlint/textlint/pull/987) - chore(deps): update dependency eslint-config-prettier to ^8.6.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/988](https://togithub.com/textlint/textlint/pull/988) - chore(deps): update dependency [@textlint/types](https://togithub.com/textlint/types) to ^12.5.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/992](https://togithub.com/textlint/textlint/pull/992) - fix(deps): update dependency [@babel/core](https://togithub.com/babel/core) to ^7.20.12 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/993](https://togithub.com/textlint/textlint/pull/993) - chore(deps): update patch updates (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/997](https://togithub.com/textlint/textlint/pull/997) - chore(deps): update dependency lerna to ^6.4.0 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/995](https://togithub.com/textlint/textlint/pull/995) - chore(deps): update dependency lerna to ^6.4.1 by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/999](https://togithub.com/textlint/textlint/pull/999) - chore(deps): update eslint to ^5.48.1 (patch) by [@renovate](https://togithub.com/renovate) in [https://github.com/textlint/textlint/pull/998](https://togithub.com/textlint/textlint/pull/998) **Full Changelog**: https://github.com/textlint/textlint/compare/v12.5.1...12.5.2 ### [`v12.5.0`](https://togithub.com/textlint/textlint/releases/tag/v12.5.0) [Compare Source](https://togithub.com/textlint/textlint/compare/v12.4.0...v12.5.0) ##### Features - add `--format=fixed-result` option to fixer format ([755dba5](https://togithub.com/textlint/textlint/commit/755dba58ce058c77b794e43a8f7522550a763437)), closes [#967](https://togithub.com/textlint/textlint/issues/967) by [@Sean0628](https://togithub.com/Sean0628) in [https://github.com/textlint/textlint/pull/978](https://togithub.com/textlint/textlint/pull/978) Example: ```bash $ cat README.md | npx textlint --stdin --stdin-filename README.md --fix --format fixed-result --output-file NEW.md ``` For more details, see◉ Linting is Async | Node.js/CommonJS | ✅ Recommended | ❌ Deprecated | | TextFixEngine | Fix Engine API. It load .textlintrc automaticaly | ◉ Loading is Sync
◉ Fixing is Async | Node.js/CommonJS | ✅ Recommended | ❌ Deprecated | | createLinter/loadTextlintrc | Support Async APIs. | ◉ Loading is Async
◉ Linting/Fixing is Async | Node.js/CommonJS and ESM | None | ✅ Recommended | - `createLinter`: create linter instance - `lintFiles(files)`: lint files and return linter messages - `lintText(text, filePath)` lint text with virtual filePath and return linter messages - `fixFiles(files` lint text and return fixer messages - `fixText(text, filePath)` lint text with virtual filePath and return fixer messages - `fixFiles` and `fixText` does not modify files - `loadTextlintrc`: load `.textlintrc` config file and return a descriptor object - `loadLinerFormatter` and `loadFixerFormatter`: load formatter Lint files and output to console. ```ts import { createLinter, loadTextlintrc, loadLinterFormatter } from "textlint"; // descriptor is a structure object for linter // It includes rules, plugins, and options const descriptor = await loadTextlintrc(); const linter = createLinter({ descriptor }); const results = await linter.lintFiles(["*.md"]); // textlint has two types formatter sets for linter and fixer const formatter = await loadLinterFormatter({ formatterName: "stylish" }) const output = formatter.format(results); console.log(output); ``` For more details, see
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.