emotion/docs/eslint-plugin-react.mdx
Chris Weber 5fa2d54a9b
Adds documentation for integrating with eslint-plugin-react (#2882)
* adds documentation for eslint plugin react

* Improve writing in eslint-plugin-react page

* Update docs/eslint-plugin-react.mdx

Co-authored-by: Sam Magura <srmagura@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
2022-09-13 10:27:07 +02:00

16 lines
623 B
Plaintext

---
title: 'eslint-plugin-react'
---
The [`react/no-unknown-property` rule](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md) from [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) will produce an error if the `css` prop is passed to a DOM element. This violation of the rule can be safely ignored because `@emotion/react` intercepts the `css` prop before it is applied to the DOM element.
The rule can be configured to ignore the `css` prop like so:
```json
{
"rules": {
"react/no-unknown-property": ["error", { "ignore": ["css"] }]
}
}
```