Skip to content

Commit

Permalink
Add flat config example to README (fixes #31)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre committed Dec 2, 2023
1 parent f55d0d2 commit 9594a20
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ npm i -D eslint-plugin-react-refresh
}
```

### Flat config

```js
import reactRefresh from "eslint-plugin-react-refresh";

export default [
{
// in main config for TSX/JSX source files
plugins: {
"react-refresh": reactRefresh,
},
rules: {
"react-refresh/only-export-components": "warn",
},
},
];
```

## Fail

```jsx
Expand Down

0 comments on commit 9594a20

Please sign in to comment.