Skip to content

Commit 875402c

Browse files
authoredMar 26, 2024··
docs(eslint-config): add note on how to use with flat config (#728)
1 parent 2df0bb7 commit 875402c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎packages/eslint-config/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,22 @@ Or to `eslintrc.js` / `.eslintrc.json`:
4444
}
4545
```
4646

47+
Or to `eslint.config.js`:
48+
49+
```
50+
const { FlatCompat } = require('@eslint/eslintrc')
51+
const sapphireEslintConfig = require('@sapphire/eslint-config')
52+
53+
const compat = new FlatCompat()
54+
55+
module.exports = [
56+
...compat.config(sapphireEslintConfig),
57+
{
58+
// other configs
59+
}
60+
]
61+
```
62+
4763
Create `tsconfig.eslint.json` next to the eslint config file, for example with content:
4864

4965
```json

0 commit comments

Comments
 (0)
Please sign in to comment.