stylelint-processor-styled-components1.8.0 • Public • Published
- This processor, to extract styles from
stylelint-config-styled-componentsconfig to disable stylelint rules that clash with
- Your favorite
stylelintconfig! (for example
(npm install --save-dev stylelint stylelint-processor-styled-components stylelint-config-styled-components stylelint-config-recommended)
Now use those in your
NOTE: The processor works with Flow- and TypeScript-typed files too! (we'll assume TypeScript usage if your files end in
Further documentation for this processor lives on the styled-components website!
Why does it throw
Unexpected token? Even thought the file didn't import
You can custom babel plugins by
option.parserPlugins now. An API example is our test. But if someone can implement #231, that will be much better.
Why does it throw unexpected lint errors?
The processor can not always parse interpolations with right things. But you can use interpolation-tagging to help it. If you have ideas to make it more intelligent, feel free to send a PR or share your solution by an new issue.
I don't want specified tagged template literal to be parsed, i.e.
You can set
option.strict. More examples are in #258.
Licensed under the MIT License, Copyright © 2017 Maximilian Stoiber. See LICENSE.md for more information!
Based on Mapbox' excellent
stylelint-processor-markdown, thanks to @davidtheclark!