Skip to content

Commit

Permalink
[Fix] markdownlint errors in rule documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sjarva committed Sep 4, 2022
1 parent 09b9dd0 commit 0e72eb6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/rules/no-unknown-property.md
Expand Up @@ -56,24 +56,23 @@ var AtomPanel = <atom-panel class="foo"></atom-panel>;
- `enabled`: for enabling the rule. 0=off, 1=warn, 2=error. Defaults to 0.
- `ignore`: optional array of property and attribute names to ignore during validation.


If you are using a library that passes something as a prop to JSX elements, it is recommended to add those props to the ignored properties.

For example, if you use [emotion](https://emotion.sh/docs/introduction) and its [`css` prop](https://emotion.sh/docs/css-prop)),
add the following to your `.eslintrc` config file:

```js
...
"react/no-unknown-property": ['error', { ignore: ['css'] }]
...

```

Now, the following code passes:

```js
var StyledDiv = <div css={{color: 'pink'}}></div>
```


## When Not To Use It

If you are not using JSX you can disable this rule.

0 comments on commit 0e72eb6

Please sign in to comment.