astroturf
astroturf copied to clipboard
Does not work with stylelint
I am using the postcss-loader with the stylelint plugin. When I'm using css-literal-loader I get the following error:
ERROR in ./~/css-loader?modules&camelcase&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./~/postcss-loader!./src/App__css_literal_loader_0.css
Module build failed: Error: ENOENT: no such file or directory, stat '/css-experiments/src/App__css_literal_loader_0.css'
at Error (native)
@ ./src/App__css_literal_loader_0.css 4:14-221 13:2-17:4 13:2-17:4 14:20-227
This could be due to how stylelint works. But it would be a killer feature. This could be considered a feature request. Maybe this can be used as inspiration: https://github.com/styled-components/stylelint-processor-styled-components
the style lint plugin might be doing something weird it should just work fine, especially if the other post css plugins are working hmm
my guess is that, despite having the file content it's still trying to read it from disk, which doesn't work since these are "real" files
I think you can use it right now with postcss-styled
as a PostCSS syntax
~Can someone give a hint on how to stylelint astroturf? I see a tweet https://twitter.com/stylelint/status/1056534785735188480 that claims stylelint supports astroturf via postcss-jsx How do I set it up? Do I need stylelint-processor-styled-components?~
UPD: wow, nvm, it just works out-of-the-box. Since v9.10 Stylelint fully supports css-in-js syntax and it works for astroturf