uselessDefaultRemove "{{propertyName}}" from {{className}}. It already matches the default value.small-rules/no-useless-defaultDisallow Roblox JSX properties whose values already match the class defaults.
Default parameters that just assign the value the type already defaults to (like undefined for an optional
field) are just noise. They don’t change the behavior of the function; they just make the signature longer.
Keep your signatures lean. If the default doesn’t actually provide a meaningful fallback, TAKE IT OUT.
uselessDefaultRemove "{{propertyName}}" from {{className}}. It already matches the default value.This rule does not accept options.
const view = <uiaspectratioconstraint AspectRatio={1} />;After auto-fix
const view = <uiaspectratioconstraint />;const view = <uiaspectratioconstraint key="my-key" />;