Skip to content

Commit 5fa2d54

Browse files
chriswebsrmaguraAndarist
authored
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>
1 parent 5ffa54a commit 5fa2d54

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/docs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
- testing
3434
- typescript
3535
- flow
36+
- eslint-plugin-react
3637

3738
# This loads the READMEs instead of files in docs/
3839
- title: Packages

docs/eslint-plugin-react.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: 'eslint-plugin-react'
3+
---
4+
5+
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.
6+
7+
The rule can be configured to ignore the `css` prop like so:
8+
9+
```json
10+
{
11+
"rules": {
12+
"react/no-unknown-property": ["error", { "ignore": ["css"] }]
13+
}
14+
}
15+
```

0 commit comments

Comments
 (0)