Pattern: Missing jsx
import from @emotion/react
Issue: -
Ensures that jsx
from @emotion/react
is imported. This rule can usually be auto-fixed so you should not usually have to do anything yourself.
Example of incorrect code for this rule:
let element = (
<div
css={{
color: 'green'
}}
/>
)
Example of correct code for this rule:
/** @jsx jsx */
import { jsx } from '@emotion/react'
let element = (
<div
css={{
color: 'green'
}}
/>
)
If you are using a babel plugin or something like that to add imports and set the jsx pragma.