Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9009

マニュアルの校正作業ツライのでVSCodeにtextlint入れた

$
0
0

そのままですが、なぐり書き。18日目は「レガシーのメンテばかりは嫌だ」と言う学生さんへのマジレスも書いているので合わせてご覧くださいませ。

書くのは好きだけど人の書いたものの読むだけってツライ、と思ったので入れたVSCodeとtextlint。

たすけてドラえもん

WindowsのVS Codeでtextlintを使ってリアルタイムに文章校正する。があるよ。
Node.js / npmをインストールする(for Windows)をみてインストールします。

npm install -global textlint textlint-rule-preset-ja-technical-writing textlint-filter-rule-comments textlint-filter-rule-whitelist

打てばOK。
色々ぶっ壊すと嫌なので階層を作って

C:\workspaces\textlint

main.md を配置

C:\workspaces\textlint>textlint --init
.textlintrc is created.

.textlintrcを以下のように編集

{
  "filters": {
      "comments": true
  },
    "rules": {
        "preset-ja-technical-writing": true
    }
}

textlint main.mdと打ってみると、コマンド上でもエラーが見られます。

もう一息

あとは、VSCode 上から textlint のチェックを実行するために拡張機能をインストールします。
vscode-textlint - Visual Studio Marketplace

インストール後 VSCode を再起動し、作成したプロジェクトを開くことで textlint が有効になります。

Ctrl + Shift + Vで、
Visual Studio Code で Markdown リアルタイムプレビュー機能を使える

Enjoy!

image.png
目視の助けくらいにはなるかも。


Viewing all articles
Browse latest Browse all 9009

Trending Articles