textlint v12.0.0
We just publish textlint v12.0.0, which is a major release upgrade of textlint.
This release adds some new features and fixes several bugs found in the previous release. This release also has some breaking changes.
Summaryโ
For textlint user
textlint improves markdown parsing, so it may found newer errors.
You can upgrade textlint via following commands:
npm install textlint@12
# or
yarn install textlint@12
textlint 12.0.0 requires Node.js 12+. If you are using Node.js 10.x, please upgrade your Node.js env.
For textlint rule creator
textlint-tester and textlint-scripts are updated.
npm install textlint-scripts@12 --save-dev
# or
yarn install textlint-scripts@12 --dev
textlint-tester@12 use export default instead of modules.exports = .
So, you need to use import TextLintTester from "textlint-tester" instead of const TextLintTester = require("textlint-tester").
- const TextLintTester = require("textlint-tester");
+ import TextLintTester from "textlint-tester";
Migration script using Semgrep.
# Install semgrep
# For macOS
$ brew install semgrep
# For Ubuntu / Windows via WSL / Linux / macOS
$ python3 -m pip install semgrep
# ---- After installation ----
# Run migration script
semgrep --config s/azu:textlint-12-migration
Breaking Changesโ
- All 
@textlint/*internal modules use same version- All modules are released as 
12.0.0. 
 - All modules are released as 
 - Drop Node.js 10.x support #600
- update 
enginesfilels to"node": "^12.20.0 || ^14.13.1 || >=16.0.0" 
 - update 
 - Modules require ES2015 supported environments #777 #774
- Now, all module target is ES2015
 - It means that textlint does not support IE
 - ๐ Node.js 12+ support ES2018+
 
 - Built-in markdown parser is updated
@textlint/markdown-to-ast@12use remark@13.0.0
 
Package Versionsโ
| Breaking Changes | Package | Previous version | Current version | 
|---|---|---|---|
| โ | textlint | 11.9.1 | 12.0.0 | 
| โ | textlint-tester | 5.3.5 | 12.0.0 | 
| โ | textlint-scripts | 3.0.0 | 12.0.0 | 
| ใ | @textlint/ast-node-types | 4.4.3 | 12.0.0 | 
| ใ | @textlint/ast-traverse | 2.3.5 | 12.0.0 | 
| ใ | @textlint/ast-tester | 2.3.5 | 12.0.0 | 
| ใ | @textlint/feature-flag | 3.3.5 | 12.0.0 | 
| ใ | @textlint/fixer-formatter | 3.3.5 | 12.0.0 | 
| @textlint/kernel | 3.4.5 | 12.0.0 | |
| ใ | @textlint/linter-formatter | 3.3.5 | 12.0.0 | 
| ใ | @textlint/module-interop | 1.2.5 | 12.0.0 | 
| โ | @textlint/textlint-plugin-markdown | 5.3.5 | 12.0.0 | 
| ใ | @textlint/textlint-plugin-text | 4.3.5 | 12.0.0 | 
| โ | @textlint/types | 1.5.5 | 12.0.0 | 
| @textlint/utils | 1.2.5 | 12.0.0 | 
Now, This monorepo includes textlint-scripts package in #779.
@textlint/markdown-to-astโ
It is a markdown parser in textlint. We have updated to remark@13.0.0, and it has many changes related to Markdown AST
You can see the changes at feat(markdown-to-ast): update to remark-parse@9 #767
This package updates also includes security fixes. CVE-2020-7753 has been fixed in textlint 12.0.0.
Featuresโ
Add FootnoteReference nodeโ
The NATO phonetic alphabet[^wiki].
[^wiki]: Read more about it on wikipedia: <http://en.wikipedia.org/wiki/NATO_phonetic_alphabet>.
Previously, It is called LinkReference, textlint@12 treat it as FootnoteReference.
Some rules may report new errors on FootnoteReference.
Known bugsโ
- gfm parsing bug that generate broken AST: remarkjs/remark-gfm#16
- โ textlint use workaround:  remarkjs/remark-gfm#16 (comment) at 
c99218e - โ markdown-to-ast does not generate broken AST.
 
 - โ textlint use workaround:  remarkjs/remark-gfm#16 (comment) at 
 
textlint-testerโ
The textlint-tester user should use import instead of require.
- const TextLintTester = require("textlint-tester");
+ import TextLintTester from "textlint-tester";
Or, pick default property.
- const TextLintTester = require("textlint-tester");
+ const TextLintTester = require("textlint-tester").default;
textlint-scriptsโ
- Update to mocha@8
 
@textlint/typesโ
- Fix 
getSourceargument type #770 
@textlint/ast-testerโ
- Improve error message #783
 
Community News ๐โ
- textlint-plugin-latex2e reach to v1.0.0 ๐
- textlint can lint LaTeX files with this plugin
 
 - @textlint/editor beta released ๐
- textlint works on your browser as browser extension
 - textlint editor - Firefox
 - textlint editor - Chrome
 - It's purpose is privacy first linting tools!
 
 
Thanks to Support!โ
VELC supports @azu as GitHub Sponsors!
- ไผ็คพ๏ผใดใงใซใฏ๏ผใจใใฆGithub Sponsorsใซใชใใพใใ - ใดใงใซใฏ - IT่ตทๆฅญใฎ่จ้ฒ (Japanese blog)
 
Many people support me, Thanks again!
If you're interested in GitHub Sponsor, please check @azu on GitHub Sponsors!
