npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@leandromatos/stylelint-config

v4.0.2

Published

Stylelint configuration for SCSS, CSS-in-JS, and Tailwind CSS.

Readme

Stylelint Config

Personal Stylelint configuration: the recommended rules tuned for SCSS, CSS-in-JS, and Tailwind CSS.

✨ Features

  • One linter config, every project — a single source of truth for Stylelint rules, so style linting never drifts between repositories.
  • SCSS, CSS-in-JS, and Tailwind — the recommended rules plus the syntaxes and configs for .scss, styled-components, and Tailwind, wired through per-file overrides.
  • ESM, Stylelint 17 — ships as an ES module against the current Stylelint major.
  • Reference by string — extend the package name; there is no rule body to copy.
  • Signal over noise — keeps the rules that catch real problems and turns off the notation and vendor-prefix rules that only add friction.
  • Formatting is Prettier's job — Stylelint 15+ dropped its stylistic rules; this config lints for defects and leaves formatting to Prettier. Pairs with @leandromatos/prettier-config.

🧭 How It Works

Stylelint resolves the string in your extends to this package and merges its rules beneath yours, the same way it resolves any shareable config. The base layer extends stylelint-config-recommended and stylelint-config-tailwindcss, then relaxes the rules that police style rather than defects.

CSS is not the only input. Styles also live in .scss files and in tagged templates inside JS and TS. The config handles each through a file override that swaps the PostCSS syntax Stylelint parses with — postcss-scss for SCSS, postcss-styled-syntax for CSS-in-JS — so the same rule set applies across all three.

Your own rules merge last, so anything you set overrides the defaults, shown under Configuration below.

Formatting is not Stylelint's job. Since Stylelint 15 the stylistic rules are gone, so this config only flags defects and leaves layout to Prettier. You run Prettier to format and Stylelint to catch problems.

📦 Installation

Install Stylelint and the config as dev dependencies:

yarn add --dev stylelint @leandromatos/stylelint-config

Stylelint >= 16 is a peer dependency, so you bring your own. The SCSS, Tailwind, and PostCSS syntax packages ship with the config.

🚀 Quick Start

Extend the config from a .stylelintrc.json:

{
  "extends": "@leandromatos/stylelint-config"
}

Run Stylelint against your styles:

yarn stylelint "**/*.{css,scss}"

Editor and lint-staged setup

Stylelint checks quality; Prettier formats. Wire both so they do not overlap.

VSCode, with the Prettier and Stylelint extensions (.vscode/settings.json) — format with Prettier on save, and run Stylelint's fixes as a separate action:

{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.stylelint": "explicit"
  }
}

lint-staged (lint-staged.config.mjs) — Prettier writes first, then Stylelint fixes:

export default {
  '*.{css,scss}': ['prettier --write', 'stylelint --fix'],
}

🧩 What's Included

The base extends the recommended and Tailwind configs, then switches syntax per file type:

| Files | Syntax | Extends | | -------------------------------- | ----------------------- | ------------------------------------------------------------------- | | *.css (default) | — | stylelint-config-recommended, stylelint-config-tailwindcss | | *.scss | postcss-scss | stylelint-config-recommended-scss, stylelint-config-tailwindcss | | *.js, *.jsx, *.ts, *.tsx | postcss-styled-syntax | base rules |

Beyond the presets, the config turns off the rules that police style rather than defects (notation and vendor-prefix rules) and sets a few conventions of its own. The exact rule set is in index.js.

⚙️ Configuration

To change a rule, extend the config and add your own rules after it:

{
  "extends": "@leandromatos/stylelint-config",
  "rules": {
    "color-hex-length": "short"
  }
}

🏷️ Versioning

Semver, published to npm. The peer range is Stylelint >= 16; a Stylelint major that changes rule behavior ships as a major here too. Snapshots publish to the snapshot dist-tag as X.Y.Z-snapshot.YYYYMMDD.N; stable releases go to latest.

🤝 Contributing

This repository follows Conventional Commits. See CONTRIBUTING.md for the workflow, releases, and local setup.

📄 License

This software is free and open source, released by Leandro Matos under the MIT License. See the LICENSE file for the full terms.