# stylelint/stylelint — codebase unpack

> Canonical page: https://codevetter.com/unpack/stylelint

This is a deterministic Repo Unpack scan of stylelint/stylelint — a structural map, not a review, security audit, or maintainer-endorsed description.

- Scanned commit: bc06c7cdb1413de3d8dc939b33af138ab7e59df1 (2026-10-01)
- Last upstream commit: Release 17.16.0 (#9551)
- Generated by codevetter 1.15.0 on 2026-10-02
- 1125 files scanned · 3.7 MB

Source inspection; upstream code and tests were not executed.

## Languages

- JavaScript: 760 files
- Markdown: 183 files
- CSS: 60 files
- JSON: 50 files
- YAML: 16 files
- HTML: 6 files
- Sass: 6 files
- TypeScript: 2 files

## Repository structure

- lib/ — 999 files
- system-tests/ — 41 files
- docs/ — 27 files
- .github/ — 12 files
- scripts/ — 12 files
- identity/ — 6 files
- .changeset/ — 5 files
- types/ — 2 files

Probable source entrypoint: `lib/` (inferred from the tree, not upstream docs)

## Source layout — lib/

- lib/formatters/ — 17 files
- lib/utils/ — 204 files
- lib/assignDisabledRanges.mjs — 1 file
- lib/augmentConfig.mjs — 1 file
- lib/constants.mjs — 1 file
- lib/createPartialStylelintResult.mjs — 1 file
- lib/getPostcssResult.mjs — 1 file
- lib/lintPostcssResult.mjs — 1 file
- lib/needlessDisables.mjs — 1 file
- lib/normalizeAllRuleSettings.mjs — 1 file
- lib/postcssPlugin.mjs — 1 file
- lib/prepareReturnValue.mjs — 1 file
- lib/printConfig.mjs — 1 file
- lib/reportUnknownRuleNames.mjs — 1 file

## Package

- package.json: stylelint v17.16.0 — 74 declared dependencies

## Structural health signals

Average score 7.2/10 across 2 files; 1 hotspots. These are deterministic review leads, not proof of a bug.

## Recent history

- bc06c7cdb141 (2026-10-01) Release 17.16.0 (#9551)
- f4fb76f709c5 (2026-09-08) Set `target-branch` to `v18` in Dependabot config (#9488)
- 20194788a393 (2026-09-07) Fix `property-layout-mappings` and `unit-layout-mappings` false negatives for uppercase property names and units (#9485)
- e8757103c662 (2026-09-07) Fix `value-keyword-layout-mappings` false positives for `caption-side` (#9483)
- 0547bff875de (2026-09-04) Release 17.15.0 (#9484)

## Overview

Stylelint is a configurable CSS linter for stylesheet authors and tooling developers, distributed as a Node.js package with a CLI, asynchronous JavaScript API, and PostCSS plugin. Its core converts stylesheets into PostCSS trees, runs explicitly configured rules, and returns diagnostics, optional edits, or rewritten files. Lazy rule loading, per-file configuration overrides, custom syntaxes, plugin rules, reference stylesheets, and experimental count-based suppressions make it adaptable to larger projects. This brief describes source inspected at commit bc06c7cdb1413de3d8dc939b33af138ab7e59df1; it does not establish runtime correctness.

## System map

The runtime is a Node.js library and CLI centered on a shared PostCSS linting pipeline. Configuration discovery, rule execution, formatting, and persistence have separate modules, while each linter instance owns several caches. npm scripts define development checks, and GitHub workflows handle CI, preview packages, and releases.
- The npm package exports lib/index.mjs and TypeScript declarations, installs bin/stylelint.mjs as the stylelint command, and requires Node.js >=20.19.0. — [package.json#L31-50](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/package.json#L31-L50) [package.json#L205-207](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/package.json#L205-L207)
- bin/stylelint.mjs forwards process.argv.slice(2) to cli; lib/index.mjs augments the PostCSS plugin creator with lint, resolveConfig, registries, plugin creation, utilities, and reference data. — [bin/stylelint.mjs#L1-7](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/bin/stylelint.mjs#L1-L7) [lib/index.mjs#L14-38](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/index.mjs#L14-L38)
- standalone orchestrates inputs and outputs; lintSource resolves configuration and parsing; lintPostcssResult loads and invokes configured rules on PostCSS roots. — [lib/standalone.mjs#L100-126](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L100-L126) [lib/lintSource.mjs#L64-122](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintSource.mjs#L64-L122) [lib/lintPostcssResult.mjs#L55-73](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L55-L73)
- createStylelint constructs cosmiconfig explorers, four in-memory Maps, and a FileCache; production discovery uses the global search strategy, while NODE_ENV=test sets a stop directory. — [lib/createStylelint.mjs#L8-36](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/createStylelint.mjs#L8-L36)
- Core rules and built-in formatters are loaded through asynchronous getters; rule import promises are retained in a module-level Map. — [lib/rules/index.mjs#L1-19](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/rules/index.mjs#L1-L19) [lib/rules/index.mjs#L175-187](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/rules/index.mjs#L175-L187) [lib/formatters/index.mjs#L1-23](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/formatters/index.mjs#L1-L23)
- Runtime integrations include PostCSS, cosmiconfig, globby, file-entry-cache, CSS parsers, and write-file-atomic; npm's version-3 lockfile records the package dependency graph. — [package.json#L127-162](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/package.json#L127-L162) [package-lock.json#L1-45](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/package-lock.json#L1-L45)
- npm scripts provide benchmarks, formatting, ESLint, Markdown linting, TypeScript checking, Jest, and node:test; TypeScript checks JavaScript strictly with no emit and excludes test files. — [package.json#L51-69](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/package.json#L51-L69) [tsconfig.json#L2-21](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/tsconfig.json#L2-L21)
- CI delegates matrix tests to a pinned reusable workflow; preview publishing uses pkg.pr.new; release-PR and release workflows delegate to pinned workflows with write permissions. — [.github/workflows/ci.yml#L16-29](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/ci.yml#L16-L29) [.github/workflows/publish-to-pkg.pr.new.yml#L19-30](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/publish-to-pkg.pr.new.yml#L19-L30) [.github/workflows/release-pr.yml#L3-13](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/release-pr.yml#L3-L13) [.github/workflows/release.yml#L3-13](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/release.yml#L3-L13)

## Feature catalog

Users can lint files, glob patterns, or supplied code and configure which rules run. Diagnostics support severity controls, custom messages, multiple formats, inline disabling, autofixes, and edit information. Custom syntaxes, reference files, configuration inheritance, and suppressions extend the basic CSS workflow.
- The CLI accepts file paths and globs or reads stdin when no positional input exists; the Node API requires either files or a code string, rejecting simultaneous or missing inputs. — [lib/cli.mjs#L576-581](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L576-L581) [lib/cli.mjs#L691-704](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L691-L704) [lib/standalone.mjs#L80-87](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L80-L87)
- Configured rules cover error prevention and conventions; color-no-invalid-hex checks declaration values while skipping URL functions, and color-hex-length supports short/long notation with autofixing. — [README.md#L26-39](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/README.md#L26-L39) [lib/rules/color-no-invalid-hex/index.mjs#L23-62](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/rules/color-no-invalid-hex/index.mjs#L23-L62) [lib/rules/color-hex-length/index.mjs#L19-79](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/rules/color-hex-length/index.mjs#L19-L79)
- Configuration supports extends and matching per-file overrides; extended rule settings are replaced as complete values, and the original config is merged last. — [lib/augmentConfig.mjs#L243-275](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L243-L275) [lib/augmentConfig.mjs#L290-300](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L290-L300) [lib/augmentConfig.mjs#L626-632](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L626-L632)
- Custom syntaxes enable other styling languages and embedded containers; the loader accepts module names or syntax objects and supplies PostCSS.stringify for parser-only modules. — [docs/developer-guide/syntaxes.md#L1-25](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/developer-guide/syntaxes.md#L1-L25) [lib/utils/getCustomSyntax.mjs#L12-43](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getCustomSyntax.mjs#L12-L43)
- Output formats include compact, json, string, tap, unix, and verbose; custom formatters receive results and aggregate metadata, and --output-file writes a report with terminal control characters removed. — [lib/formatters/index.mjs#L1-23](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/formatters/index.mjs#L1-L23) [docs/developer-guide/formatters.md#L3-32](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/developer-guide/formatters.md#L3-L32) [lib/cli.mjs#L626-628](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L626-L628) [lib/writeOutputFile.mjs#L11-14](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/writeOutputFile.mjs#L11-L14)
- Users can control severity, messages, URLs, quiet reporting, and inline disables; lintSource additionally runs needless, invalid-scope, descriptionless, and unscoped-disable reporting after rules. — [lib/lintPostcssResult.mjs#L101-108](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L101-L108) [lib/utils/report.mjs#L39-74](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/report.mjs#L39-L74) [lib/lintSource.mjs#L128-132](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintSource.mjs#L128-L132)
- Autofixing offers strict and lax parsing modes; computeEditInfo returns replacement ranges and text when fixing is disabled, respecting disableFix and inline disable ranges. — [lib/cli.mjs#L81-90](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L81-L90) [lib/getPostcssResult.mjs#L27-28](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getPostcssResult.mjs#L27-L28) [lib/getPostcssResult.mjs#L61-64](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getPostcssResult.mjs#L61-L64) [lib/utils/report.mjs#L230-280](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/report.mjs#L230-L280)
- Reference files are resolved as globs and parsed with optional custom syntax/loaders; experimental bulk suppressions persist error counts per file and rule, with stdin suppression rejected by the CLI. — [lib/augmentConfig.mjs#L491-518](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L491-L518) [lib/utils/getReferenceRoots.mjs#L23-50](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getReferenceRoots.mjs#L23-L50) [docs/user-guide/suppressions.md#L3-20](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/user-guide/suppressions.md#L3-L20) [lib/cli.mjs#L583-593](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L583-L593)

## Data flow

Input paths are normalized and filtered before stylesheet reads. Per-file configuration controls parsing, reference loading, rule execution, and diagnostic transformation. PostCSS results own execution metadata, while standalone turns those results into reports and optional disk writes.
- standalone resolves relative codeFilename against cwd; file inputs escape existing literal paths, add default node_modules exclusions, expand globs to absolute paths, and apply ignore-file patterns. — [lib/standalone.mjs#L136-146](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L136-L146) [lib/standalone.mjs#L207-249](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L207-L249)
- getConfigForFile prefers options.config, then configFile, then searchPath discovery with a cwd fallback; augmented configuration is cached per target path. — [lib/getConfigForFile.mjs#L40-63](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getConfigForFile.mjs#L40-L63) [lib/getConfigForFile.mjs#L66-106](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getConfigForFile.mjs#L66-L106)
- augmentConfigFull applies basic augmentation, plugins, processors, reference-file resolution, custom syntax, rule normalization, and language-option validation in that order. — [lib/augmentConfig.mjs#L129-165](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L129-L165)
- getPostcssResult selects supplied code or UTF-8 file contents, parses through PostCSS, and caches results by normalized path; lax mode selects postcss-safe-parser. — [lib/getPostcssResult.mjs#L19-52](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getPostcssResult.mjs#L19-L52) [lib/getPostcssResult.mjs#L61-64](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getPostcssResult.mjs#L61-L64)
- Reference stylesheets are independently read and processed with optional loaders; Document nodes are flattened into roots, then attached to result.stylelint alongside the lexer and rule metadata. — [lib/utils/getReferenceRoots.mjs#L23-50](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getReferenceRoots.mjs#L23-L50) [lib/lintSource.mjs#L102-120](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintSource.mjs#L102-L120)
- report resolves severity and custom messages, filters quiet warnings, applies eligible fixes, records disabled warnings, and otherwise emits PostCSS warnings with locations and optional edit data. — [lib/utils/report.mjs#L36-105](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/report.mjs#L36-L105) [lib/utils/report.mjs#L206-223](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/report.mjs#L206-L223)
- createPartialStylelintResult separates deprecations, invalid options, and parse errors from ordinary warnings; prepareReturnValue derives errored/maxWarningsExceeded and calls the selected formatter. — [lib/createPartialStylelintResult.mjs#L26-84](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/createPartialStylelintResult.mjs#L26-L84) [lib/prepareReturnValue.mjs#L14-49](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/prepareReturnValue.mjs#L14-L49)
- String input returns fixed CSS as result.code; file input conditionally writes changed CSS atomically, applies result processors and suppressions, reconciles caching, and then formats aggregate output. — [lib/standalone.mjs#L171-202](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L171-L202) [lib/standalone.mjs#L284-304](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L284-L304) [lib/standalone.mjs#L340-375](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L340-L375) [lib/standalone.mjs#L402-412](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L402-L412)

## Behavior traces

The inspected traces cover CLI initialization, file linting, stdin linting, fixing, suppression persistence, configuration printing, and PostCSS integration. These paths converge at lintSource but have different output and persistence behavior. Conditions such as ignored inputs, cache hits, syntax errors, and conflicting flags materially change the sequence.
- CLI startup runs bin → cli → buildCLI/meow; help and version return early, while custom formatter loading and typed option translation precede selecting files or stdin. — [bin/stylelint.mjs#L5-7](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/bin/stylelint.mjs#L5-L7) [lib/cli.mjs#L370-429](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L370-L429) [lib/cli.mjs#L576-581](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L576-L581) [lib/cli.mjs#L724-746](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L724-L746)
- File linting runs standalone → getFileIgnorer/createStylelint → globby/filterFilePaths → lintSource → getConfigForFile/getPostcssResult → lintPostcssResult; unmatched and fully ignored inputs have separate errors unless allowEmptyInput is enabled. — [lib/standalone.mjs#L94-124](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L94-L124) [lib/standalone.mjs#L239-270](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L239-L270) [lib/standalone.mjs#L317-325](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L317-L325) [lib/lintSource.mjs#L64-122](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintSource.mjs#L64-L122)
- For color-no-invalid-hex, lintPostcssResult resolves the rule, supplies normalized settings, and invokes its root callback; that callback validates options, walks declarations/value tokens, calculates offsets, and calls report for invalid hex words. — [lib/lintPostcssResult.mjs#L65-73](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L65-L73) [lib/lintPostcssResult.mjs#L98-140](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L98-L140) [lib/rules/color-no-invalid-hex/index.mjs#L23-62](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/rules/color-no-invalid-hex/index.mjs#L23-L62) [lib/utils/report.mjs#L94-105](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/report.mjs#L94-L105)
- Stdin runs getStdin → standalone's code branch → lintSource → createPartialStylelintResult → result processors → prepareReturnValue; fixed code goes to stdout, reports to stderr, and lint errors or excess warnings set the lint-problem exit code. — [lib/cli.mjs#L691-704](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L691-L704) [lib/standalone.mjs#L165-204](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L165-L204) [lib/cli.mjs#L618-640](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L618-L640)
- A color-hex-length fix flows from its report fix object → isFixApplied → callback mutation of the declaration → root serialization; standalone writes only changed, nonignored file results when its fix argument is truthy. — [lib/rules/color-hex-length/index.mjs#L56-79](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/rules/color-hex-length/index.mjs#L56-L79) [lib/utils/report.mjs#L206-223](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/report.mjs#L206-L223) [lib/standalone.mjs#L287-297](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L287-L297)
- Suppression persistence runs standalone path resolution → SuppressionsService.suppress → load → countProblemsByRule → applySuppressions → prune → save; standalone reloads the JSON and applies suppressions before final formatting. — [lib/standalone.mjs#L327-361](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L327-L361) [lib/utils/suppressionsService.mjs#L43-76](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/suppressionsService.mjs#L43-L76) [lib/utils/suppressionsService.mjs#L241-287](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/suppressionsService.mjs#L241-L287) [lib/utils/suppressionsService.mjs#L295-315](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/suppressionsService.mjs#L295-L315)
- --print-config runs printConfig → resolveConfig → createStylelint/getConfigForFile → JSON serialization omitting private properties; printConfig rejects stdin, multiple paths, and dynamic glob patterns. — [lib/cli.mjs#L596-603](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L596-L603) [lib/printConfig.mjs#L23-42](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/printConfig.mjs#L23-L42) [lib/resolveConfig.mjs#L23-42](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/resolveConfig.mjs#L23-L42)
- PostCSS integration runs stylelint(options) → createStylelint → Once(root, helpers) → lintSource with existingPostcssResult; supplied trees bypass getPostcssResult parsing and rules run against each root of a Document. — [lib/postcssPlugin.mjs#L13-38](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/postcssPlugin.mjs#L13-L38) [lib/lintSource.mjs#L89-96](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintSource.mjs#L89-L96) [lib/lintPostcssResult.mjs#L40-44](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L40-L44)

## Testing signals

Tests and CI were inspected, not executed; no passing result or measured coverage is asserted. The repository combines Jest rule schemas, integration tests, snapshot system tests, and selected node:test suites. The inspected tests demonstrate substantial behavioral specifications, but this bounded review does not establish exhaustive coverage or identify every untested branch.
- package.json configures Jest with jest-preset-stylelint, a Node environment, lib/system-tests/.changeset roots, V8 coverage, and global 90% thresholds; these are configured targets, not observed results. — [package.json#L82-121](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/package.json#L82-L121)
- jest.setup.mjs exposes testRule and testRuleConfigs against the public lint API; setupAfterEnv clears emitted-warning state after each test. — [jest.setup.mjs#L1-8](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/jest.setup.mjs#L1-L8) [jest.setupAfterEnv.mjs#L1-5](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/jest.setupAfterEnv.mjs#L1-L5)
- The inspected color-no-invalid-hex rule tests specify accepted alpha hex forms, quoted strings, URL fragments, and rejected hex values with exact start/end positions. — [lib/rules/color-no-invalid-hex/__tests__/index.mjs#L6-82](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/rules/color-no-invalid-hex/__tests__/index.mjs#L6-L82)
- standalone-fix tests specify fixed string output, config-enabled fixing, ignored inputs, and inline-disable behavior; edit-information tests specify replacement text/ranges and disableFix handling. — [lib/__tests__/standalone-fix.test.mjs#L18-65](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/__tests__/standalone-fix.test.mjs#L18-L65) [lib/__tests__/standalone-fix.test.mjs#L68-105](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/__tests__/standalone-fix.test.mjs#L68-L105) [lib/__tests__/standalone-compute-edit-info.test.mjs#L5-69](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/__tests__/standalone-compute-edit-info.test.mjs#L5-L69)
- standalone-cache tests inspect persisted cache entries, changed-file selection, config invalidation, and exclusion of error/warning files; their setup and cleanup perform filesystem mutations. — [lib/__tests__/standalone-cache.test.mjs#L38-144](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/__tests__/standalone-cache.test.mjs#L38-L144)
- CLI tests specify flag parsing; suppression tests mock process streams and check conflicting flags/stdin rejection; plugin tests exercise relative and absolute modules through PostCSS. — [lib/__tests__/cli.test.mjs#L31-99](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/__tests__/cli.test.mjs#L31-L99) [lib/__tests__/cli-suppressions.test.mjs#L22-92](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/__tests__/cli-suppressions.test.mjs#L22-L92) [lib/__tests__/plugins.test.mjs#L47-104](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/__tests__/plugins.test.mjs#L47-L104)
- System case 001 snapshots both filesystem and string-input APIs; snapshot preparation normalizes sources and removes private PostCSS results. The contributor guide explicitly describes system tests as real-use-case checks rather than comprehensive coverage. — [system-tests/001/fs.test.mjs#L7-16](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/system-tests/001/fs.test.mjs#L7-L16) [system-tests/001/no-fs.test.mjs#L7-16](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/system-tests/001/no-fs.test.mjs#L7-L16) [system-tests/systemTestUtils.mjs#L37-58](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/system-tests/systemTestUtils.mjs#L37-L58) [docs/contributor-guide/system-tests.md#L3-14](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/contributor-guide/system-tests.md#L3-L14)
- CI declares Node 20/22/24/26 across three OS families, a separate Node-24 coverage job, and an explicitly enabled Yarn PnP run; the default-gated PnP suite packages and installs dependencies, so ordinary Jest coverage does not imply it ran. — [.github/workflows/ci.yml#L22-34](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/ci.yml#L22-L34) [.github/workflows/ci.yml#L48-71](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/ci.yml#L48-L71) [system-tests/006/yarn-pnp.test.mjs#L37-38](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/system-tests/006/yarn-pnp.test.mjs#L37-L38) [system-tests/006/yarn-pnp.test.mjs#L85-125](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/system-tests/006/yarn-pnp.test.mjs#L85-L125)

## Risk map

The main sensitive boundaries are executable extensions, arbitrary configured filesystem paths, cache invalidation, and privileged workflow automation. Several source details warrant focused regression checks, particularly custom cwd handling and shared mutable state. Observations below describe behavior or explicitly labeled hypotheses; they are not confirmed vulnerabilities.
- Plugin, processor, syntax, loader, and formatter paths load JavaScript into the current Node process; dynamicImport directly invokes import rather than providing an execution sandbox. — [lib/augmentConfig.mjs#L400-410](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L400-L410) [lib/augmentConfig.mjs#L447-456](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L447-L456) [lib/utils/getCustomSyntax.mjs#L12-17](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getCustomSyntax.mjs#L12-L17) [lib/utils/dynamicImport.mjs#L14-26](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/dynamicImport.mjs#L14-L26)
- Module resolution tries the configuration directory, cwd, and global node_modules; config explorers use global search strategy, so resolution can cross the project directory boundary. — [lib/utils/getModulePath.mjs#L24-39](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getModulePath.mjs#L24-L39) [lib/createStylelint.mjs#L20-29](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/createStylelint.mjs#L20-L29)
- Caller-controlled paths reach stylesheet/reference reads and fix/report writes; report output recursively creates parent directories, while FileCache can remove and recreate its configured cache file after a load failure. — [lib/getPostcssResult.mjs#L38-41](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getPostcssResult.mjs#L38-L41) [lib/utils/getReferenceRoots.mjs#L26-32](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getReferenceRoots.mjs#L26-L32) [lib/writeOutputFile.mjs#L11-14](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/writeOutputFile.mjs#L11-L14) [lib/utils/FileCache.mjs#L33-44](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/FileCache.mjs#L33-L44)
- Hypothesis: heterogeneous per-file configurations need careful cache regression coverage because FileCache.calcHashOfConfig retains only its first hash, although lintSource calls it with each file's resolved config. (inferred) — [lib/utils/FileCache.mjs#L54-60](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/FileCache.mjs#L54-L60) [lib/utils/FileCache.mjs#L78-95](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/FileCache.mjs#L78-L95) [lib/lintSource.mjs#L81-86](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintSource.mjs#L81-L86) [lib/getConfigForFile.mjs#L89-106](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getConfigForFile.mjs#L89-L106)
- Suppression file location is resolved against standalone's cwd, but suppression entry keys are calculated using process.cwd(); persistence uses plain writeFile, and suppression matches counts rather than individual diagnostic identities. — [lib/standalone.mjs#L327-350](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L327-L350) [lib/utils/suppressionsService.mjs#L160-183](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/suppressionsService.mjs#L160-L183) [lib/utils/suppressionsService.mjs#L274-287](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/suppressionsService.mjs#L274-L287)
- computeEditInfo invokes fix.apply and mutates nodes even without config.fix; it suppresses overlapping edits and records a narrowed replacement, making rule order and mutation behavior material to editor integration. — [lib/utils/report.mjs#L230-267](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/report.mjs#L230-L267) [lib/lintPostcssResult.mjs#L55-60](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L55-L60)
- Rule callbacks share PostCSS roots/results and are collected into promises; deprecated context.fix remains supported but is disabled for rules affected by inline disable ranges. — [lib/lintPostcssResult.mjs#L110-154](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L110-L154) [lib/lintPostcssResult.mjs#L157-166](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L157-L166)
- The privileged workflow_run comment job consumes downloaded preview artifact metadata; postCustomComment takes output.number as its target and constructs comments from package URLs. The inspected workflow has a repository guard but no success-condition guard. — [.github/workflows/update-pkg.pr.new-comment.yml#L9-23](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/update-pkg.pr.new-comment.yml#L9-L23) [.github/workflows/update-pkg.pr.new-comment.yml#L35-54](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/update-pkg.pr.new-comment.yml#L35-L54) [scripts/pkg.pr.new-custom-comment.mjs#L14-28](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/scripts/pkg.pr.new-custom-comment.mjs#L14-L28) [scripts/pkg.pr.new-custom-comment.mjs#L67-98](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/scripts/pkg.pr.new-custom-comment.mjs#L67-L98)

## Extension points

Stylelint exposes extension interfaces for rules, syntaxes, configuration, reporting, and reference loading. Core rules and formatters use explicit registries, while configured plugin definitions are normalized into lookup tables. Most extension behavior converges on PostCSS roots and the shared reporting utility.
- New core rules plug into ruleNames in lib/rules/index.mjs; enumerable getters resolve each rule's index.mjs through a cached import promise. — [lib/rules/index.mjs#L11-23](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/rules/index.mjs#L11-L23) [lib/rules/index.mjs#L175-187](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/rules/index.mjs#L175-L187)
- createPlugin returns {ruleName, rule}; plugin augmentation accepts a single definition or array, requires names containing '/', and installs functions into config._pluginFunctions. — [lib/createPlugin.mjs#L4-8](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/createPlugin.mjs#L4-L8) [lib/augmentConfig.mjs#L412-433](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L412-L433)
- Rule factories receive primary settings, secondary options, and context, returning callbacks invoked with root and result; promise aggregation accommodates asynchronous callbacks. — [lib/lintPostcssResult.mjs#L98-140](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L98-L140) [lib/lintPostcssResult.mjs#L143-154](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L143-L154) [docs/developer-guide/plugins.md#L97-126](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/developer-guide/plugins.md#L97-L126)
- Public plugin utilities include report, ruleMessages, validateOptions, and checkAgainstRule; report integrates severity, disable ranges, fix callbacks, and edit information. — [lib/index.mjs#L22-27](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/index.mjs#L22-L27) [lib/utils/report.mjs#L36-105](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/report.mjs#L36-L105)
- Custom syntaxes can supply parse/stringify objects or modules; extension-language configs can select syntax through overrides and disable incompatible core rules. — [lib/utils/getCustomSyntax.mjs#L12-40](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getCustomSyntax.mjs#L12-L40) [docs/developer-guide/syntaxes.md#L28-53](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/developer-guide/syntaxes.md#L28-L53)
- Custom formatters implement formatter(results, returnValue); API selection accepts functions/promises or existing file paths, and the CLI separately imports --custom-formatter modules. — [docs/developer-guide/formatters.md#L3-16](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/developer-guide/formatters.md#L3-L16) [lib/utils/getFormatter.mjs#L15-42](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getFormatter.mjs#L15-L42) [lib/cli.mjs#L711-718](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/cli.mjs#L711-L718)
- Configured processors are factories returning name and postprocess; augmentation validates both fields, stores callbacks by name, and standalone invokes them on each converted result and its root. — [lib/augmentConfig.mjs#L442-482](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L442-L482) [lib/standalone.mjs#L402-412](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L402-L412)
- referenceFiles entries accept files, customSyntax, and loader; loaders can be imported modules or supplied PostCSS plugins and are installed into a dedicated reference-file processor. — [lib/augmentConfig.mjs#L203-219](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L203-L219) [lib/augmentConfig.mjs#L505-518](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L505-L518) [lib/utils/getLoader.mjs#L10-24](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getLoader.mjs#L10-L24) [lib/utils/getReferenceRoots.mjs#L23-32](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/getReferenceRoots.mjs#L23-L32)

## Contributor handoff

Start with the public API and the narrow rule or integration path being changed. Preserve configuration precedence, diagnostic locations, disable behavior, and the distinction between string output and file persistence. Tests and CI were inspected, not executed; future verification must report actual outcomes and respect the current read-only restriction.
- Read package.json and the npm lockfile before planning checks; npm test invokes pretest linting, then Jest and node:test, whereas test-only targets Jest with lifecycle scripts disabled. — [package.json#L57-69](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/package.json#L57-L69) [package-lock.json#L1-9](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/package-lock.json#L1-L9)
- For runtime changes, begin with index, standalone, lintSource, and lintPostcssResult; preserve the callable PostCSS export and its explicit module.exports interoperability binding. — [lib/index.mjs#L14-38](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/index.mjs#L14-L38) [lib/standalone.mjs#L165-198](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L165-L198) [lib/lintSource.mjs#L108-134](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintSource.mjs#L108-L134) [lib/lintPostcssResult.mjs#L130-154](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/lintPostcssResult.mjs#L130-L154)
- Rule edits should remain standard-CSS focused and use validateOptions, syntax/type guards, and report; contributor guidance requires accepted/rejected cases and varied locations, including multiple warnings. — [docs/contributor-guide/rules.md#L11-19](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/contributor-guide/rules.md#L11-L19) [docs/contributor-guide/rules.md#L30-58](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/contributor-guide/rules.md#L30-L58) [docs/contributor-guide/rules.md#L78-88](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/contributor-guide/rules.md#L78-L88) [docs/contributor-guide/rules.md#L121-126](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/contributor-guide/rules.md#L121-L126)
- Maintain .mjs/JSDoc conventions and strict no-emit checking; EditorConfig uses tabs generally and two-space indentation for package.json, Markdown, CSS, and YAML. — [lib/rules/color-hex-length/index.mjs#L24-30](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/rules/color-hex-length/index.mjs#L24-L30) [tsconfig.json#L2-21](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/tsconfig.json#L2-L21) [.editorconfig#L4-17](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.editorconfig#L4-L17)
- Configuration edits require examining getConfigForFile and augmentConfig: cache keys include target paths, inheritance replaces whole rule settings, and overrides merge in matching order. — [lib/getConfigForFile.mjs#L43-61](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getConfigForFile.mjs#L43-L61) [lib/getConfigForFile.mjs#L89-106](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/getConfigForFile.mjs#L89-L106) [lib/augmentConfig.mjs#L290-300](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L290-L300) [lib/augmentConfig.mjs#L626-632](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/augmentConfig.mjs#L626-L632)
- Fix-related edits must cover string-input output, atomic file writes, disable ranges, and edit-information mutation; existing tests specify config-enabled fixes and disableFix behavior. — [lib/standalone.mjs#L171-202](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L171-L202) [lib/standalone.mjs#L287-297](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/standalone.mjs#L287-L297) [lib/utils/report.mjs#L230-267](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/utils/report.mjs#L230-L267) [lib/__tests__/standalone-compute-edit-info.test.mjs#L39-69](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/lib/__tests__/standalone-compute-edit-info.test.mjs#L39-L69)
- When execution is authorized, the existing test-only script supports a narrow Jest test-file check before broader verification; npm test adds linting and node:test, while the Yarn PnP suite requires explicit enabling and performs packaging/install operations. — [package.json#L63-69](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/package.json#L63-L69) [system-tests/006/yarn-pnp.test.mjs#L37-38](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/system-tests/006/yarn-pnp.test.mjs#L37-L38) [system-tests/006/yarn-pnp.test.mjs#L85-125](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/system-tests/006/yarn-pnp.test.mjs#L85-L125)
- This handoff records inspected test and CI specifications, not executed results; distinguish configured coverage thresholds and declared matrix jobs from observed passes, and do not treat snapshot system cases as exhaustive coverage. — [package.json#L96-103](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/package.json#L96-L103) [.github/workflows/ci.yml#L22-29](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/.github/workflows/ci.yml#L22-L29) [docs/contributor-guide/system-tests.md#L3-14](https://github.com/stylelint/stylelint/blob/bc06c7cdb1413de3d8dc939b33af138ab7e59df1/docs/contributor-guide/system-tests.md#L3-L14)

Source repository: https://github.com/stylelint/stylelint
Full evidence corpus: https://github.com/Codevetter/codevetter/tree/main/benchmarks/repo-unpacks/stylelint.json

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
