astroturf icon indicating copy to clipboard operation
astroturf copied to clipboard

Does not work with stylelint

Open 0xR opened this issue 8 years ago • 4 comments

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

0xR avatar Nov 06 '16 14:11 0xR

the style lint plugin might be doing something weird it should just work fine, especially if the other post css plugins are working hmm

jquense avatar Nov 06 '16 14:11 jquense

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

jquense avatar Nov 06 '16 14:11 jquense

I think you can use it right now with postcss-styled as a PostCSS syntax

ai avatar Jun 28 '18 19:06 ai

~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

dreyks avatar Sep 17 '19 10:09 dreyks