loading

v33.3.1

select option

no-deprecated-props

Disallow the use of deprecated props

This rule disallows the use of deprecated props in ink components. These props will eventually be deleted. Avoid using them to mitigate the risk of your product breaking in the near future.

Severity

Recommended severity: error

rules: {
'@carta/ink-rules/no-deprecated-props': 2 ,
}

Components affected by this rule

At the moment the components and props affected by this rule are:

ComponentPropReplacement Prop
Alerttypevariant
ListItemstatusColorvariant
ListItemstatusIconvariant
ListItemstatusDashedvariant
ListItemstatusInversevariant
ListItemstatusSpinnervariant= "pending"
MonologuemarginBottomBox bottom
MonologuemarginTopBox top
NewInputinputRefexternalRef
Statuscolorvariant
Statusiconvariant
StatusisDashedvariant
StatusisInversevariant
StatusisSpinnervariant= "pending"

Examples

🚫 Incorrect code for this rule:

<ListItem statusColor="green" statusIcon="checkmark" statusDashed statusInverse />
<Ink.ListItem statusColor="yellow" statusIcon="loading" statusSpinner />
<NewInput inputRef={} />
<Ink.NewInput inputRef={} />
<Status color="green" icon="checkmark" isDashed isInverse />
<Ink.Status color="yellow" icon="loading" isSpinner />

Correct code for this rule:

<ListItem variant="positive" />
<Ink.ListItem variant="pending" />
<NewInput externalRef={} />
<Ink.NewInput externalRef={} />
<Status variant="positive" />
<Ink.Status variant="pending" />

How this rule works

To investigate how this rule works, check out this gist on AST Explorer.

Is this page helpful?