A stylelint processor for styled-components
Last updated 9 months ago by fabb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @fabb/stylelint-processor-styled-components 
SYNC missed versions from official npm registry.


Lint your styled components with stylelint!

Build Status Coverage Status Join the community on Spectrum Greenkeeper

Video of project in use


You need:

(npm install --save-dev

Now use those in your .stylelintrc and run stylelint with your JavaScript files!

  "processors": ["stylelint-processor-styled-components"],
  "extends": [

NOTE: The processor works with Flow- and TypeScript-typed files too! (we'll assume TypeScript usage if your files end in .ts or .tsx)


Further documentation for this processor lives on the styled-components website!


Why does it throw Unexpected token? Even thought the file didn't import styled-components.

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. css.

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!

Current Tags

  • 1.9.0-alpha1                                ...           latest (9 months ago)

1 Versions

  • 1.9.0-alpha1                                ...           9 months ago
Maintainers (1)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (4)
Dev Dependencies (12)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |