ガイド
はじめる
気軽につかう
npx markuplint target.html
必須スペック
- Node.js v14.6.0以上
プロジェクトでつかう
設定ファイルをつくり、依存モジュールをインストールします。
npx markuplint --init
コマンド上で対話式の質問に答えます。
これによりmarkuplint
を含む必要なモジュールがインストールされます。
package.json
のscripts
プロパティにコマンドを追記します。
package.json
{
"scripts": {
"lint:html": "markuplint \"**/*.html\""
}
}
ターゲットパスを変更したい場合は、定義プロジェクトに合わせて変更してください。
以下のようにスクリプトを実行します。
- npm
- Yarn
- pnpm
npm run lint:html
yarn lint:html
pnpm run lint:html
Visual Studio Codeでつかう
Visual Studio Marketplaceからインストール可能です。もしくは“markuplint”とVS Code拡張機能から検索してください。