File tree Expand file tree Collapse file tree 5 files changed +634
-460
lines changed Expand file tree Collapse file tree 5 files changed +634
-460
lines changed Original file line number Diff line number Diff line change 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" },
Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff line change 11import antfu from '@antfu/eslint-config'
22import dxhuii from './dist/index.js'
33
4- export default antfu ( { } , dxhuii ( ) )
4+ export default antfu ( { formatters : true } , dxhuii ( ) )
Original file line number Diff line number Diff line change 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"
You can’t perform that action at this time.
0 commit comments