mirror of
https://github.com/emotion-js/emotion.git
synced 2026-01-25 16:42:24 +00:00
* 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>
16 lines
623 B
Plaintext
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"] }]
|
|
}
|
|
}
|
|
```
|