Stylelint

An extensible CSS linter that catches errors and enforces consistent styling conventions.

Tool
npm
v17.15.0
11,528 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
91 /100 Excellent
Development Activity 100
Maintenance 96
Community 68
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
91 /100 Excellent
Architecture 88
Code Quality 92
Innovation 84
Learning Curve 100

Stylelint is a mighty CSS linter used to catch syntax errors, flag problematic-but-valid patterns like duplicate selectors, and enforce team conventions such as notation styles, naming patterns, and selector limits. It ships with over 100 built-in rules covering modern CSS syntax and features, and can automatically fix many of the problems it finds.

Beyond plain CSS, Stylelint understands CSS-like languages including Sass, Less, and SugarSS through custom syntax support, and can extract and lint embedded styles from HTML, Markdown, and CSS-in-JS template literals. A plugin system lets teams write their own rules, and shareable configs let organizations package and distribute their conventions across projects. It is commonly paired with a formatter like Prettier, with Stylelint handling correctness and convention enforcement while the formatter handles whitespace and layout.

What You Get

  • 100+ built-in rules covering modern CSS syntax, at-rules, custom properties, and color/value notations
  • Automatic fixing (--fix) for a large subset of rules, reducing manual cleanup after a lint run
  • Shareable, extensible configs (extends) so an organization can define conventions once and reuse them across repos
  • A plugin API for writing custom rules and custom syntaxes beyond the built-in rule set
  • Support for linting CSS embedded in HTML, Markdown, and CSS-in-JS template literals, plus Sass/Less/SugarSS via custom syntaxes
  • Multiple output formatters (JSON, compact, TAP, Unix, verbose) for wiring into CI, editors, or other tooling

Common Use Cases

  • Enforcing a shared CSS style guide across a team or organization via a shareable config
  • Catching CSS errors (invalid values, unknown properties, malformed grid areas) before they ship
  • Auto-fixing formatting-adjacent CSS issues as part of a pre-commit hook or CI pipeline
  • Linting CSS-in-JS or CSS embedded in Markdown/HTML documentation alongside the rest of a codebase

Under The Hood

Architecture Standalone.mjs is the orchestrating core: it resolves configuration for each target through getConfigForFile.mjs and augmentConfig.mjs (cosmiconfig-based discovery with cascading extends/plugins merging), discovers files via fast-glob/globby with ignore-file support, parses each one into a PostCSS AST through getPostcssResult.mjs (with pluggable custom syntaxes for SCSS/Less/CSS-in-JS), and applies the enabled rules by walking that AST in lintPostcssResult.mjs, collecting warnings through a shared report() utility. createStylelint.mjs assembles an internal API object shared across a run, and results are shaped into LintResult objects rendered by interchangeable formatters. The CLI is a thin wrapper around the same standalone() entry point used by the Node.js API and the PostCSS-plugin integration, so all three surfaces share one execution path.

Tech Stack Node.js 20.19+, authored as ESM throughout. PostCSS is the parsing engine, complemented by postcss-value-parser, postcss-selector-parser, and postcss-safe-parser plus the @csstools/* family for tokenizing, media queries, and selector specificity. Config discovery runs on cosmiconfig; file matching on fast-glob, globby, and micromatch; CLI argument parsing on meow; caching on file-entry-cache; and fixes are written safely via write-file-atomic. Type declarations are hand-authored rather than compiled from source, checked against usage via tsc in CI.

Code Quality Testing is extensive: Jest drives per-rule test suites (each of the 150+ rules has its own tests directory with fixtures), coverage thresholds are enforced at 90% branches/functions/lines, and Node’s built-in test runner covers CJS/ESM interop system tests separately. ESLint’s flat config runs with —max-warnings=0 alongside Prettier, wired through lint-staged and a git pre-commit hook, and CI runs lint, type-check, and both test suites on every change. Rule modules follow a consistent functional shape (options validated via validateOptions.mjs, messages templated via ruleMessages.mjs, warnings emitted via report()) with JSDoc type annotations standing in for full TypeScript source.

API Design Three equally-supported entry points — CLI, Node.js API, and PostCSS plugin — let Stylelint slot into build tools, editors, or ad hoc scripts without redesigning the calling code. Its config model (extends/plugins/rules, cascading per-directory resolution) closely mirrors ESLint’s, so JavaScript-ecosystem developers already familiar with that shape get near-zero ramp-up. Writing a custom rule is minimal boilerplate — a function of an option that returns an AST-walking function — and each built-in rule ships its own README with runnable examples, a documentation depth few linters match at this scale.

Used by 58 apps in this directory

Python
99%
MIT

Agent Lightning

AI Development

18,515

A Microsoft-built training framework that optimizes AI agents with reinforcement learning, automatic prompt optimization, or supervised fine-tuning — with near-zero code changes to your existing agent, in any framework.

View details
85
Repo Health
68
Technical
69
Dependency
Built with
Python 99%
Updated 4 days ago
Vue
43%
MIT

Alexandrie

Collaboration · Knowledge Management · Note Taking

2,777

The open-source, offline-first Notion, Obsidian & Confluence alternative with multi-tenant teams, OIDC/SSO, and one-command Docker deployment.

View details
86
Repo Health
73
Technical
74
Dependency
Built with
Vue 43%
TypeScript 41%
Go 13%
Updated 1 weeks ago
Python
55%
Other

authentik

Authentication · Security

25,758

The self-hosted Identity Provider that replaces Okta, Auth0, and Entra ID with a unified SSO platform supporting SAML, OAuth2/OIDC, LDAP, RADIUS, and WebAuthn.

View details
92
Repo Health
81
Technical
66
Dependency
Built with
Python 55%
TypeScript 36%
Updated 4 days ago
Go
55%
Apache 2.0

Authgear

Authentication

2,074

Open-source, self-hostable authentication platform with passkeys, biometric login, SSO, MFA, and GraphQL admin API — a full Auth0/Clerk/Firebase alternative for SaaS and mobile apps.

View details
88
Repo Health
81
Technical
68
Dependency
Built with
Go 55%
HTML 24%
TypeScript 18%
Updated 1 weeks ago
Python
68%
Other

Baserow

Databases · No Code Platforms

6,012

Open-source no-code platform to build databases, apps, automations, and AI agents — self-hosted or cloud, with full data ownership.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Python 68%
JavaScript 16%
Vue 11%
Updated 5 days ago
Java
72%
Other

ByteChef

AI Agents · Automation

1,003

Unified open-source platform for AI agent orchestration and workflow automation with 180+ connectors, MCP support, and durable execution.

View details
85
Repo Health
82
Technical
67
Dependency
Built with
Java 72%
TypeScript 28%
Updated 5 days ago
PHP
78%
Other

Craft CMS

CMS

3,609

A developer-first PHP CMS with clean-slate content modeling, auto-generated GraphQL API, and a four-tier edition system that scales from solo projects to enterprise deployments.

View details
96
Repo Health
83
Technical
62
Dependency
Built with
PHP 78%
JavaScript 14%
Updated 5 days ago
Java
70%
GPL 3.0

DataEase

AI Assistants · Analytics · Data Engineering

24,558

Open-source BI tool with drag-and-drop dashboards, 20+ data source connectors, and AI-powered natural language queries — a self-hosted alternative to Tableau.

View details
94
Repo Health
71
Technical
65
Dependency
Built with
Java 70%
Vue 29%
Updated 4 days ago
Rust
67%
Other

DefGuard

Authentication · Networking · Security

2,849

Self-hosted secure remote access that unifies WireGuard VPN, identity management, and connection-level MFA in one open-source platform.

View details
84
Repo Health
82
Technical
72
Dependency
Built with
Rust 67%
TypeScript 31%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers