denoで stylelintする
(Updated more than a year ago)
いまのところ、このブログはlumeで作っている。
denoだとdeno lintでts, jsに対するlintingはできるけど、cssとかに対するlintingはできないので面倒。
nodeだとstylelintがあるので、それをdenoで使う方法をまとめておく。
#実行
deno run -A npm:stylelint <files...>
#設定ファイル
nodeだとstylelint自身がextendsに入れたものを解決してくれるが、denoだとnode_modulesが無くて解決できない。
なので、設定ファイルの評価タイミングで解決しておく。
import { rule as standard } from "npm:stylelint-config-standard"
export default {
rules: {
...standard,
},
}
解決をstylelintでできない都合上、使えるfiletypeはmjsとjsだけっぽい?