I just use VS Code with Prettier & ESLint with the Styled Components extension. Works great for me Answer from PeteCapeCod4Real on reddit.com
🌐
GitHub
github.com › styled-components › stylelint-processor-styled-components
GitHub - styled-components/stylelint-processor-styled-components: Lint your styled components with stylelint! · GitHub
May 14, 2021 - Lint your styled components with stylelint! Contribute to styled-components/stylelint-processor-styled-components development by creating an account on GitHub.
Starred by 651 users
Forked by 51 users
Languages   JavaScript
🌐
npm
npmjs.com › package › eslint-plugin-styled-components-a11y
eslint-plugin-styled-components-a11y - npm
May 6, 2025 - This plugin adds the ability to lint styled components according to the rules outlined in eslint-plugin-jsx-a11y.. Latest version: 2.2.1, last published: 10 months ago. Start using eslint-plugin-styled-components-a11y in your project by running `npm i eslint-plugin-styled-components-a11y`. There are 24 other projects in the npm registry using eslint-plugin-styled-components-a11y.
      » npm install eslint-plugin-styled-components-a11y
    
Published   May 06, 2025
Version   2.2.1
Author   https://github.com/brendanmorrell
Discussions

Is there a favoured way to lint Styled Components?
I just use VS Code with Prettier & ESLint with the Styled Components extension. Works great for me More on reddit.com
🌐 r/reactjs
11
13
March 1, 2020
Stylelint v14 and stylelint-processor-styled-components
Hey folks thanks for making Styled Components. Read through the template, checked Stack Overflow, this feels like the most appropriate place to post this issue. Stylelint 14.0.0 shipped and it appe... More on github.com
🌐 github.com
64
October 25, 2021
reactjs - How to format css-in-js styles order using stylelint? - Stack Overflow
I am using styled-components, prettier and stylelint. More on stackoverflow.com
🌐 stackoverflow.com
reactjs - Custom `stylelint` plugin for `styled-components` - Stack Overflow
I have been trying to build a new custom stylelint plugin for styled-components after following the instructions here. The requirement is to build a custom stylelint plugin, where I want to prevent... More on stackoverflow.com
🌐 stackoverflow.com
🌐
npm
npmjs.com › package › stylelint-processor-styled-components
stylelint-processor-styled-components - npm
February 14, 2020 - Lint your styled components with stylelint!
      » npm install stylelint-processor-styled-components
    
🌐
Reddit
reddit.com › r/reactjs › is there a favoured way to lint styled components?
r/reactjs on Reddit: Is there a favoured way to lint Styled Components?
March 1, 2020 -

I got the OK from my higher-up to implement Styled-Components into a project at work, and despite a million personal projects I've never used them in production.

Anybody have any good tooling chains for linting that are production ready? I've found a few packages, but most only support 1 or 2 rules. I'm not looking to enforce any super strict standards such as strict alphabetical as we have our own SCSS structuring rules here that I'll using. Just low-level stuff.

I've also found a few ways to do this through stylelint but I've read some wonky reviews. Not sure if they've been ironed out.

Would love to hear how people are implementing these on the big stage. Thanks in advance!

EDIT:. Thanks everyone. Seems like StyleLint is the way to go. For anyone curious, these are what I went with:

stylelint

stylelint-config-recommended

stylelint-config-styled-components

stylelint-custom-processor-styled-components

stylelint-processor-styled-components

I've been toying with it this weekend and really like it. Using these with a .stylelintrc is making for a great development experience so far.

🌐
Medium
medium.com › styled-components › announcing-production-ready-linting-for-styled-components-58adcdc4a97
Announcing production-ready linting for styled-components | by Emil Goldsmith Olesen | 💅 styled-components | Medium
June 10, 2018 - Today, we’re very excited to announce stylelint-processor-styled-components@1.0.0: reliably lint the CSS in your styled-components with the full power of stylelint! If you’re new to the world of linters, stylelint is the most popular tool to catch errors in your CSS before they happen.
🌐
GitHub
github.com › styled-components › styled-components › issues › 3607
Stylelint v14 and stylelint-processor-styled-components · Issue #3607 · styled-components/styled-components
October 25, 2021 - Stylelint 14.0.0 shipped and it appears to have broken or at least set out to deprecate (loudly) the Styled Components tooling linked to from your docs.
Author   johnnybenson
🌐
Medium
medium.com › @srinivasthedeveloper › stylelint-keeping-your-styled-components-in-check-aa429ebe374f
Stylelint — Keeping Your Styled Components in Check! 🎨 | by Srinivas K | Medium
October 25, 2023 - Hi, young web developer! Today, we have a fun and colourful journey ahead. We’re going to learn about a tool called Stylelint. It’s like a superhero that helps us keep our styled components neat and clean!
🌐
GitHub
github.com › styled-components › stylelint-config-styled-components
GitHub - styled-components/stylelint-config-styled-components: The shareable stylelint config for stylelint-processor-styled-components
The shareable stylelint config for stylelint-processor-styled-components - styled-components/stylelint-config-styled-components
Starred by 68 users
Forked by 10 users
Languages   JavaScript 100.0% | JavaScript 100.0%
Find elsewhere
🌐
Wecult
wecult.dev › en › _ › stylelint-with-styledcomponents
Integrate Stylelint with Prettier and Styled-components | wecult
August 7, 2022 - How to integrate Stylelint with Prettier and Styled-components and enable lint check on CSS
Top answer
1 of 1
1

Use the stylelint-config-recess-order shared config, rather than stylelint-config-rational-order:

{
  "extends": [
    "stylelint-config-standard",
    "stylelint-config-recess-order"
  ],
  "customSyntax": "postcss-styled-syntax"
}

The recess order config is maintained (last published 2 weeks ago), unlike the rational order config (last published 4 years ago). The recess order config appears compatible with the postcss-styled-syntax custom syntax and supports modern CSS properties.

The two configs have similar groupings, i.e., they start with positioning, box model, typography, etc.

Running npx stylelint test.tsx gives:

import styled from "styled-components";

export const Test = styled.div<{ active: boolean }>`

  display: flex;
  flex: 1;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  cursor: pointer;
  background: ${(p) => p.active && "var(--blue)"};
  border-radius: 50%;
  transition: var(--transition-200);

  &:hover {
    background: ${(p) => !p.active && "var(--blue-hover)"};
  }

  &:last-child {
    margin-right: 0;
  }
`;

Stylelint also detected and removed the duplicate height property.

If you want empty lines between groups, you can follow the advanced guidance when to configure the rule:

const propertyGroups = require('stylelint-config-recess-order/groups')

module.exports = {
    extends: ["stylelint-config-standard"],
    plugins: ["stylelint-order"],
    customSyntax: "postcss-styled-syntax",
    rules: {
        // Configure the custom rule manually.
        'order/properties-order': propertyGroups.map((group) => ({
            ...group,
            emptyLineBefore: 'always'
        })),
    },
}

Additionally, you don't need:

  • stylelint-config-prettier as stylelint-config-standard no longer conflicts with Prettier
  • stylelint-prettier as it's recommended to run Prettier as a separate tool
🌐
Lightrun
lightrun.com › answers › styled-components-styled-components-website-remove-stylelint-processor-styled-components-in-stylelint-section
Remove stylelint-processor-styled-components in stylelint section
According to those two GitHub issues stylelint-processor-styled-components is deprecated as it provokes bugs and stylelint now supports CSS-in-JS out of th...
🌐
Medium
medium.com › @srinivasthedeveloper › adding-super-custom-style-lint-rules-for-styled-components-c4cf74fa137b
Adding Super Custom Style-Lint Rules for Styled-Components 🚀 | by Srinivas K | Medium
October 26, 2023 - npm install --save-dev \ stylelint \ stylelint-processor-styled-components \ stylelint-config-recommended \ stylelint-custom-processor-loader
🌐
Medium
medium.com › swlh › keeping-your-css-in-js-clean-with-stylelint-8822c8c1543a
How To Use Stylelint with CSS in JS | The Startup
June 10, 2019 - Stylelint is a fantastic project that makes it easy to enforce convention and avoid errors in your styles. However, up until recently I had never used it with CSS in JS. The release of version 9.5.0 added first class support for linting CSS in JS. Now it’s easier than ever to lint your projects styled with popular libraries like styled-components and emotion.
🌐
GitHub
github.com › styled-components › stylelint-processor-styled-components › issues › 187
Unable to lint CSS and Styled Components with processor enabled · Issue #187 · styled-components/stylelint-processor-styled-components
May 21, 2018 - Using v9.2.1 I am able to lint styled-components once again, however I am not able to lint CSS files while the processor is enabled.
Published   May 21, 2018
Author   stramel
🌐
styled-components
styled-components.com › docs › tooling
styled-components
Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress
🌐
<mxstbr/>
mxstbr.blog › 2016 › 12 › linting-styles-in-js-with-stylelint
Linting styles in JavaScript with stylelint - Max Stoibers Blog
December 14, 2016 - The issue is that you write this ... font-size: 1em; @media screen and (min-width: 750px) { font-size: 1.1em; } `; stylelint is a linter for CSS, meaning it helps you make sure you’re writing good code....