Tools
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.
Recommended severity: error
rules: {'@carta/ink-rules/no-deprecated-props': 2 ,}
At the moment the components and props affected by this rule are:
Component | Prop | Replacement Prop |
---|---|---|
Alert | type | variant |
ListItem | statusColor | variant |
ListItem | statusIcon | variant |
ListItem | statusDashed | variant |
ListItem | statusInverse | variant |
ListItem | statusSpinner | variant= "pending" |
Monologue | marginBottom | Box bottom |
Monologue | marginTop | Box top |
NewInput | inputRef | externalRef |
Status | color | variant |
Status | icon | variant |
Status | isDashed | variant |
Status | isInverse | variant |
Status | isSpinner | variant= "pending" |
🚫 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" />
To investigate how this rule works, check out this gist on AST Explorer.
Is this page helpful?