![]()
最近 textlint を試しているのですが、動かなくなりました。
設定ファイルがあるのにルールがないと言われます。
$ textlint == No rules found, textlint hasn’t done anything == Possible reasons: * Your textlint config file has no rules. * You have no config file and you aren’t passing rules via command line. * Your textlint config has a syntax error. => How to set up rules? https://github.com/textlint/textlint/blob/master/docs/configuring.md
ルールはあるしこないだまで使えていたのにな?と思いつつ一旦 ~/.textlintrc.json を退避、 init で新規に作り直すとまた動くようになりました。
$ mv ~/.textlintrc.json ~/.textlintrc.json.bak $ textlint --init $ echo "猫が食べれます" | textlint --stdin --stdin-filename *.txt matoken.txt 1:5 error ら抜き言葉を使用しています。 no-dropping-the-ra 1:7 error 文末が"。"で終わっていません。 ja-technical-writing/ja-no-mixed-period ✖ 2 problems (2 errors, 0 warnings)
設定ファイルを比較すると使わないので削除した plugins のせいだったようです。 false にしていても駄目なんですね。
plugin
asciidoc は削除していた$ diff -u ~/.textlintrc.json.bak ~/.textlintrc.json
--- /home/matoken/.textlintrc.json.bak 2024-09-22 08:08:05.407222868 +0900
+++ /home/matoken/.textlintrc.json 2024-10-02 06:28:38.779496703 +0900
@@ -1,16 +1,16 @@
{
"plugins": {
- "asciidoc": false,
"asciidoctor": true,
"html": true
},環境
$ textlint --version v14.2.0 $ dpkg-query -W nodejs nodejs 20.17.0+dfsg-2 $ lsb_release -dr Description: Debian GNU/Linux trixie/sid Release: n/a $ arch x86_64