Skip to main content

no-paint-heavy-declarations

Warn on paint-heavy declarations only when the value exceeds a concrete budget, such as multi-layer shadows, large shadow blur radii, excessive filter stacks, or large blur filters.

This rule intentionally allows ordinary component shadows and simple filters. If the only signal is "this property can be expensive in some cases," the rule stays quiet.

Rule optionsโ€‹

OptionDefaultWhy
ignoreProperties[]Allows approved paint-heavy properties in audit profiles.
maxFilterBlurRadiusPx30Allows moderate static blur values and catches unusually large blur effects.
maxFilterFunctions4Allows common static filter stacks and catches unusually long pipelines.
maxShadowBlurRadiusPx48Allows larger component elevation but flags very large soft shadows.
maxShadowLayers3Allows layered component shadows while catching excessive paint stacks.
{
"css-performance-budget/no-paint-heavy-declarations": [
true,
{
"ignoreProperties": ["box-shadow"],
"maxFilterBlurRadiusPx": 30,
"maxFilterFunctions": 4,
"maxShadowBlurRadiusPx": 48,
"maxShadowLayers": 3
}
]
}