Getting Started
Installโ
npm install --save-dev stylelint stylelint-plugin-css-performance-budget
Use the ๐ข recommended configโ
import { performanceBudgetPluginConfigs } from "stylelint-plugin-css-performance-budget";
export default performanceBudgetPluginConfigs["performance-budget-recommended"];
See ๐ข performance-budget-recommended for the exact rule list, or compare all profiles in the config matrix.
Use plugin + explicit rulesโ
import performanceBudgetPlugin from "stylelint-plugin-css-performance-budget";
export default {
plugins: [...performanceBudgetPlugin],
rules: {
"css-performance-budget/no-layout-thrashing-properties": true,
"css-performance-budget/no-paint-heavy-declarations": true,
},
};
Next Stepsโ
- Review the rule overview for the full catalog.
- Compare ๐ข recommended, ๐ก๏ธ strict, and ๐ฃ all configs.
- Use developer docs when changing package exports or generated docs surfaces.