prettier-plugin-stylus-formatter
v1.0.0
Published
Prettier plugin for Stylus
Downloads
12
Maintainers
Readme
prettier-plugin-stylus-formatter
It uses stylus-supremacy formatting options and supports overwriting format rules.
Features
- Fully customizable formatting rules
- Compatible with Vue.js Single-File Components
Usage
yarn add -D prettier-plugin-stylus-formatterThen add it to your prettier.config.js file, e.g.:
{
files: ["*.styl"],
options: {
parser: "stylus",
plugins: [require.resolve("prettier-plugin-stylus-formatter")],
tabWidth: 4,
singleQuote: false,
semi: true,
useTabs: false,
stylusOptions: {
insertColons: true,
insertSemicolons: true,
insertBraces: true,
...
},
},
}If you are using pnp as moduleLinker then you also have to run:
yarn unplug prettier-plugin-stylus-formatterand in your prettier.config.js file add plugin like this:
{
files: ["*.styl"],
options: {
parser: "stylus",
plugins: [require.resolve("prettier-plugin-stylus-formatter")],
tabWidth: 4,
...
},
}License
This project is licensed under the MIT License.
