v0.152.0
Minor Changes
-
#1273
21367384Thanks @tenphi! - Add an ESLint plugin at@cube-dev/ui-kit/eslint-pluginwith a new autofixable rule,no-redundant-default-prop, that flags props explicitly set to the value the component already defaults to (<Button type="outline">,<Select size="medium">).The rule only reports components it can prove were imported from
@cube-dev/ui-kit, so a local or third-party component sharing a name with a ui-kit export is never touched. Use thepackagesoption to opt in an internal barrel that re-exports ui-kit.// eslint.config.js import uiKit from "@cube-dev/ui-kit/eslint-plugin"; export default [...uiKit.configs.recommended];
The defaults it checks against are pregenerated by rendering each component twice — with and without the prop — and comparing markup and tasty CSS, so props whose default is conditional, context-derived, or reflected onto the DOM are excluded rather than incorrectly flagged. 72 components and 346 defaults are covered.
Also corrects six documented defaults that had drifted from the implementation:
Dialogsize:S→MSwitchsize:large→mediumTabssize:'small'→'medium'DialogContainerisDismissable:false→trueRadioGrouporientation:autowas not a valid value; the default is derived fromtypeDatePickeruseLocale: documented asfalse, but leaving it unset is a third mode distinct fromfalse— unset applies the kit's own segment order,falseforcesen-US