{"id":20435,"library":"prettier-plugin-stylus","title":"Prettier Plugin for Stylus","description":"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.","status":"active","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/lsdsjy/prettier-plugin-stylus","tags":["javascript","prettier","stylus","plugin"],"install":[{"cmd":"npm install prettier-plugin-stylus","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-plugin-stylus","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-plugin-stylus","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Prettier plugins are not imported directly; they are loaded via configuration.","wrong":"Attempting to import or require the plugin directly in code","symbol":"default","correct":"Add 'prettier-plugin-stylus' to .prettierrc under plugins, or use --plugin=prettier-plugin-stylus on CLI"}],"quickstart":{"code":"{\n  \"semi\": false,\n  \"singleQuote\": true,\n  \"plugins\": [\"prettier-plugin-stylus\"]\n}\n\n# Then format a Stylus file:\nnpx prettier --write style.styl","lang":"javascript","description":"Configures Prettier to format Stylus files and formats a .styl file."},"warnings":[{"fix":"Add 'plugins': ['prettier-plugin-stylus'] to .prettierrc file.","message":"Plugin must be listed in 'plugins' config; using --plugin for each file invocation can be tedious.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Update Prettier to v2.7 or later.","message":"Stylus parser inference for Vue SFC requires Prettier v2.7+. Older versions won't detect Stylus inside <style lang=\"stylus\">.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install prettier-plugin-stylus' or 'yarn add prettier-plugin-stylus'.","cause":"Plugin not installed in project's node_modules.","error":"Error: Cannot find module 'prettier-plugin-stylus'"},{"fix":"Ensure plugin is listed in Prettier's 'plugins' config.","cause":"Plugin not loaded; Prettier doesn't recognize .styl files.","error":"Unsupported language: stylus"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}