retext-textlint
retext plugin to use textlint.
Installation
npm:
npm install retext-textlint
Usage
Install textlint plugins.
npm:
npm install textlint-plugin-jtf-style
- example/example.js
var retext = var japanese = var textlint = var compact = var text = 'タイトル「文章の推敲に必要なこと」\n' + '\n' + '1 これは前段です。これは中段(2文の場合は後段という。)です。これは後段です。聡は常用漢字表外の漢字です。' var options = plugins: 'textlint-plugin-jtf-style' /*** === file ===* : line 1, col 10, Warning - "jtf-style/2.1.2.漢字" 「敲」は「常用漢字表」外の漢字です。* : line 3, col 41, Warning - "jtf-style/2.1.2.漢字" 「聡」は「常用漢字表」外の漢字です。* : line 3, col 17, Error - "jtf-style/2.1.8.算用数字" 算用数字は「半角」で表記します。* * 3 problems*/
- example/.textlintrc
"plugins": "jtf-style" "rules": "jtf-style/2.1.2.漢字": "severity" : "warning" "jtf-style/4.1.1.句点(。)": false "jtf-style/3.1.1.全角文字と半角文字の間": false
API
retext.use(textlint, options)
Parameters
-
textlint
— This plugin. -
options
(Object
, optional)plugins
(Array.<string>
) - textlint plugin name array.