File: eslint-plugin-react.mdx

package info (click to toggle)
node-emotion 11.10.7%2Bds1%2B~cs8.3.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,816 kB
  • sloc: javascript: 26,863; makefile: 25
file content (15 lines) | stat: -rw-r--r-- 623 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
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"] }]
  }
}
```