# Data flow — stylelint/stylelint

> Canonical page: https://codevetter.com/unpack/stylelint/data-flow

# Data flow — stylelint/stylelint

Scanned commit bc06c7cdb1413de3d8dc939b33af138ab7e59df1 (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

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)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

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