stylelint-config-inspector
v2.0.3
Published
A visual tool for inspecting and understanding your Stylelint configs
Maintainers
Readme
Stylelint Config Inspector
A visual tool for inspecting and understanding your Stylelint configuration.
Screenshot
Usage
From a project that contains a Stylelint config (stylelint.config.* or .stylelintrc*), run:
npx stylelint-config-inspector@latestThen open http://localhost:8888/.
Resolve for a target file
Use a target file so Stylelint resolves context-sensitive options (overrides, customSyntax, etc.):
npx stylelint-config-inspector --file src/styles/app.cssIf you do not provide --file or --target, the inspector resolves your config against a synthetic file named stylelint-inspector-target.css relative to the resolved base path.
--file and --target are equivalent.
Static build
To generate a static inspector snapshot:
npx stylelint-config-inspector buildThis emits a single-page app in .stylelint-config-inspector.
Monorepo / package subdirectory inspection
When inspecting a package inside a monorepo, set the base path for file glob matching and target resolution:
npx stylelint-config-inspector --config stylelint.config.mjs --basePath packages/web --file src/app.cssEnvironment aliases are also supported:
STYLELINT_BASE_PATH(or legacyESLINT_BASE_PATH)STYLELINT_TARGET(or legacyESLINT_TARGET)
Run npx stylelint-config-inspector --help for all options.
License
Contributors ✨
Thanks goes to these wonderful people (emoji key):
