Skip to content

Commit 39aa18f

Browse files
committed
feat: 升级依赖,支持 formatters 配置
1 parent 2d93119 commit 39aa18f

File tree

5 files changed

+634
-460
lines changed

5 files changed

+634
-460
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// Silent the stylistic rules in you IDE, but still auto fix them
1616
"eslint.rules.customizations": [
1717
{ "rule": "style/*", "severity": "off" },
18+
{ "rule": "format/*", "severity": "off" },
1819
{ "rule": "*-indent", "severity": "off" },
1920
{ "rule": "*-spacing", "severity": "off" },
2021
{ "rule": "*-spaces", "severity": "off" },

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
# @dxhuii/eslint-config
22

33
[![npm](https://img.shields.io/npm/v/@dxhuii/eslint-config?color=444&label=)](https://npmjs.com/package/@dxhuii/eslint-config)
4+
45
- 现在 [@antfu/eslint-config](https://github.com/antfu/eslint-config#react) 已经支持了react, 在此的基础上增加了 react 的一些配置和一些自己的配置
56

67
## 使用
78

8-
```bash
9-
pnpm add -D @dxhuii/eslint-config @antfu/eslint-config
10-
```
9+
```bash
10+
pnpm add -D @dxhuii/eslint-config @antfu/eslint-config
11+
```
12+
13+
```js
14+
// eslint.config.js
15+
// 增加了 react 支持
16+
import dxhuii from '@dxhuii/eslint-config'
1117

12-
```js
13-
// eslint.config.js
14-
// 增加了 react 支持
15-
import dxhuii from '@dxhuii/eslint-config'
18+
// 默认不支持 react, 开启需要传入 react: true
19+
import antfu from '@antfu/eslint-config'
1620

17-
// 默认不支持 react, 开启需要传入 react: true
18-
import antfu from '@antfu/eslint-config'
21+
export default antfu({}, dxhuii())
22+
```
1923

20-
export default await antfu({}, await dxhuii())
21-
```
22-
- 其他使用方法和 [@antfu/eslint-config](https://github.com/antfu/eslint-config#readme) 一样
23-
- 开启支持react方法 [#react](https://github.com/antfu/eslint-config#react)
24+
- 其他使用方法和 [@antfu/eslint-config](https://github.com/antfu/eslint-config#readme) 一样
25+
- 开启支持react方法 [#react](https://github.com/antfu/eslint-config#react)
2426

2527
## 感谢
28+
2629
- [@antfu/eslint-config](https://github.com/antfu/eslint-config)

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import antfu from '@antfu/eslint-config'
22
import dxhuii from './dist/index.js'
33

4-
export default antfu({}, dxhuii())
4+
export default antfu({ formatters: true }, dxhuii())

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,24 @@
3131
"prepare": "simple-git-hooks"
3232
},
3333
"peerDependencies": {
34+
"@antfu/eslint-config": ">=2.0.0",
3435
"eslint": ">=8.0.0"
3536
},
3637
"dependencies": {
38+
"@unocss/eslint-config": "^0.58.0",
39+
"eslint-plugin-format": "^0.1.0",
3740
"eslint-plugin-react": "^7.33.2",
3841
"eslint-plugin-react-hooks": "^4.6.0",
39-
"eslint-plugin-react-refresh": "^0.4.4"
42+
"eslint-plugin-react-refresh": "^0.4.5"
4043
},
4144
"devDependencies": {
42-
"@antfu/eslint-config": "^2.1.0",
45+
"@antfu/eslint-config": "^2.3.4",
4346
"@dxhuii/eslint-config": "workspace:*",
44-
"@types/eslint": "^8.44.7",
45-
"@types/node": "^20.9.4",
47+
"@types/eslint": "^8.44.8",
48+
"@types/node": "^20.10.3",
4649
"bumpp": "^9.2.0",
47-
"eslint": "^8.54.0",
48-
"lint-staged": "^15.1.0",
50+
"eslint": "^8.55.0",
51+
"lint-staged": "^15.2.0",
4952
"simple-git-hooks": "^2.9.0",
5053
"tsup": "^8.0.1",
5154
"typescript": "^5.3.2"

0 commit comments

Comments
 (0)