Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit f304864

Browse files
committed
Add more sections
1 parent edc03e7 commit f304864

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,32 @@
1919
# eslint-define-config
2020

2121
Provide a `defineConfig` function for `.eslintrc.js` files.
22+
23+
# Installation
24+
25+
```bash
26+
# add eslint and eslint-define-config to project’s dev dependencies
27+
npm install --dev eslint eslint-define-config
28+
# or
29+
yarn add --dev eslint eslint-define-config
30+
```
31+
32+
# Usage
33+
34+
`.eslintrc.js`
35+
36+
```ts
37+
const { defineConfig } = require('eslint-define-config');
38+
39+
module.exports = defineConfig({
40+
root: true,
41+
rules: {
42+
// rules...
43+
}
44+
});
45+
```
46+
47+
# Credits
48+
49+
- `Vite` and [Evan You](https://github.com/yyx990803) for the idea
50+
- @antfu and her [tweet](https://twitter.com/antfu7/status/1365907188338753536)

0 commit comments

Comments
 (0)