Skip to main content

Getting Started

Installโ€‹

npm install --save-dev stylelint stylelint-plugin-css-performance-budget
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โ€‹