stylelint と stylelint-processor-styled-components を使っている場合、
通常の CSS/SCSS ファイルを lint しようとすると、エラーが出てしまいます。
そこで、 CSS/SCSS では styled-components の processor を使わないようにする方法。
前提環境は以下の通り:
- stylelint 13.0.0
- stylelint-processor-styled-components 1.9.0
やり方としては単純で、無視する設定を追加してあげれば良いのです。
{ "extends": [ "stylelint-config-standard", "stylelint-config-styled-components" ], "processors": [ [ "stylelint-processor-styled-components", { // この設定が必要 "ignoreFiles": ["**/*.css", "**/*.scss"] } ] ] }
以上、簡単な記事でした (╹⌓╹ )。
参考 :