prism_lints 0.1.0
prism_lints: ^0.1.0 copied to clipboard
Lint rules that keep the Prism design system honest: flag spacing, radii, durations and colours that duplicate a design token, so an app cannot drift away from the system it installed.
Changelog #
0.1.0 #
Initial release.
Added #
hardcoded_spacing— reportsEdgeInsetsandSizedBoxvalues that match aPrismTokens.space*token.hardcoded_radius— reportsBorderRadius.circularvalues that match aPrismTokens.radius*token.hardcoded_duration— reportsDurationvalues that match aPrismTokens.duration*token, and deliberately stays silent on an animated widget'sduration:argument so a line never produces two warnings with the same fix.prefer_prism_motion— reports any animation duration that ignores the platform reduce-motion setting. This is the rule carrying an accessibility finding rather than a style preference.hardcoded_semantic_color— reports a hex copied fromPrismColors.- 22 unit tests, plus an
example/fixture that verifies the rules end to end against resolved code.