3
2

More than 5 years have passed since last update.

Stylelintでファイルを除外する

Posted at

tl;dr

  • 設定ファイルのignoreFilesにGlobで書きまくればいい

状況

  • PostCSS + SugarSS
  • Webpack (4.8.1)

なぜか.stylelintignoreが全く反映されなかったので、設定ファイルに除外先を指定することにしました。

以下のように.stylelintrc.ymlなどに書けば対象のファイルが除外されます。

---
extends: stylelint-config-sugarss-recommended
plugins:
  - stylelint-order
ignoreFiles:
  - node_modules/**/*.css
  - src/lib/**/*.css
rules:
  - order/properties-alphabetical-order: true
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2