VSCode + Stylelint で、CSSファイル以外でエラーが出る対処法(TypeError: result.apply is not a function at 〜)

ウェブ制作

VSCode に Stylint の拡張機能を使用中に、
jsファイルを保存時に、なぜか『TypeError: result.apply is not a function at …』と、Stylelintのエラーが出る問題が出て消す方法をメモ

VSCode の設定ファイルに下記の設定を追記 CSSとHTMLとSCSSをチェック対象に設定すれば解決。

{
  "stylelint.validate": ["css", "html", "scss"], // ここを追記
}

参考: https://github.com/stylelint/stylelint/issues/4793

タイトルとURLをコピーしました