retext-textlint
retext plugin to use textlint.
Installation
npm:
npm install retext-textlint
Usage
Install textlint plugins.
npm:
npm install textlint-plugin-jtf-style
var retext = require('retext')
var japanese = require('retext-japanese')
var textlint = require('retext-textlint')
var compact = require('eslint/lib/formatters/compact')
var text = 'タイトル「文章の推敲に必要なこと」\n' +
'\n' +
'1 これは前段です。これは中段(2文の場合は後段という。)です。これは後段です。聡は常用漢字表外の漢字です。'
var options = {
plugins: [
'textlint-plugin-jtf-style'
]
}
retext().use(japanese).use(textlint, options).process(text, (err, file, doc) => {
console.log('\n=== file ===')
console.log(compact([file]))
})
{
"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
Related
License
MIT