Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds documentation for eslint plugin react #2882

Merged
merged 4 commits into from Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs.yaml
Expand Up @@ -33,6 +33,7 @@
- testing
- typescript
- flow
- eslint-plugin-react

# This loads the READMEs instead of files in docs/
- title: Packages
Expand Down
13 changes: 13 additions & 0 deletions docs/eslint-plugin-react.mdx
@@ -0,0 +1,13 @@
---
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"] }]
},
Andarist marked this conversation as resolved.
Show resolved Hide resolved
```