Skip to content

Commit 8c6be5a

Browse files
authored
Update readme (#41)
1 parent 88a5dbc commit 8c6be5a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,36 @@ Or add the "recommended" preset:
4242
}
4343
```
4444

45+
### ESLint v9 Flat Config
46+
47+
Enable the rules in your ESLint configuration file:
48+
49+
```js
50+
import workspaces from "eslint-plugin-workspaces";
51+
52+
export default [
53+
{
54+
plugins: { workspaces },
55+
rules: {
56+
"workspaces/no-relative-imports": "error",
57+
"workspaces/require-dependency": "warn",
58+
},
59+
},
60+
// ...
61+
];
62+
```
63+
64+
Or add the "recommended" preset:
65+
66+
```js
67+
import workspaces from "eslint-plugin-workspaces";
68+
69+
export default [
70+
workspaces.configs["flat/recommended"],
71+
// ...
72+
];
73+
```
74+
4575
## Rules
4676

4777
✔ included in the "recommended" preset
@@ -59,6 +89,8 @@ Or add the "recommended" preset:
5989

6090
- `recommended` enables rules recommended for all users
6191
- `all` enables all rules
92+
- `flat/recommended` enables rules recommended for all users
93+
- `flat/all` enables all rules
6294

6395
# License
6496

0 commit comments

Comments
 (0)