Registry / devops / prettier-plugin-stylus

prettier-plugin-stylus

JSON →
library0.1.0jsnpmunverified

A Prettier plugin for formatting Stylus stylesheets. Current stable version is 0.1.0 with irregular release cadence. Provides Pythonic-style formatting and is compatible with Vue.js Single-File Components via Stylus parser inference. Alternative to stylefmt or manual formatting; leverages Prettier's ecosystem for consistent code style across languages.

npm install prettier-plugin-stylus
INSTALL
IMPORT
SIG · PRETTIER-PLUGIN-ST
P
prettier-plugin-stylus
devopsjavascriptv0.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
Add 'prettier-plugin-stylus' to .prettierrc under plugins, or use --plugin=prettier-plugin-stylus on CLI
Attempting to import or require the plugin directly in code
Prettier plugins are not imported directly; they are loaded via configuration.

Configures Prettier to format Stylus files and formats a .styl file.

{ "semi": false, "singleQuote": true, "plugins": ["prettier-plugin-stylus"] } # Then format a Stylus file: npx prettier --write style.styl
Debug
Known issues
gotchaPlugin must be listed in 'plugins' config; using --plugin for each file invocation can be tedious.
fix
Add 'plugins': ['prettier-plugin-stylus'] to .prettierrc file.
affects: >=0.1.0
gotchaStylus parser inference for Vue SFC requires Prettier v2.7+. Older versions won't detect Stylus inside <style lang="stylus">.
fix
Update Prettier to v2.7 or later.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'prettier-plugin-stylus'
Plugin not installed in project's node_modules.
fix
Run 'npm install prettier-plugin-stylus' or 'yarn add prettier-plugin-stylus'.
Unsupported language: stylus
Plugin not loaded; Prettier doesn't recognize .styl files.
fix
Ensure plugin is listed in Prettier's 'plugins' config.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
prettier-plugin-stylus — npm install prettier-plugin-stylus · libregistry