Skip to content

v0.152.0

Choose a tag to compare

@tenphi tenphi released this 03 Aug 10:44
· 148 commits to main since this release
ca29155

Minor Changes

  • #1273 21367384 Thanks @tenphi! - Add an ESLint plugin at @cube-dev/ui-kit/eslint-plugin with 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 the packages option 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:

    • Dialog size: S → M
    • Switch size: large → medium
    • Tabs size: 'small' → 'medium'
    • DialogContainer isDismissable: false → true
    • RadioGroup orientation: auto was not a valid value; the default is derived from type
    • DatePicker useLocale: documented as false, but leaving it unset is a third mode distinct from false — unset applies the kit's own segment order, false forces en-US