diff --git a/docs/docs.yaml b/docs/docs.yaml index 19e11d17e..199c46e15 100644 --- a/docs/docs.yaml +++ b/docs/docs.yaml @@ -33,6 +33,7 @@ - testing - typescript - flow + - eslint-plugin-react # This loads the READMEs instead of files in docs/ - title: Packages diff --git a/docs/eslint-plugin-react.mdx b/docs/eslint-plugin-react.mdx new file mode 100644 index 000000000..88324bd27 --- /dev/null +++ b/docs/eslint-plugin-react.mdx @@ -0,0 +1,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"] }] + } +} +```