Skip to content

Commit

Permalink
feat: refactor eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
vtrbo committed Feb 20, 2024
1 parent 6395446 commit f5855d0
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 5,672 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
declare module '*.vue' {
import type { DefineComponent } from 'vue'

const Component: DefineComponent<{}, {}, any>
const Component: DefineComponent<any, any, any>
export default Component
}
1 change: 0 additions & 1 deletion docs/functions/arr/groupBy.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ npm install @vtrbo/utils-arr
|------|--------|----------------------|-----|-----|
| list | 欲分组的数据 | `T[]` | `` | - |
| fn | 分组条件 | `(single: T) => any` | `` | - |

4 changes: 2 additions & 2 deletions docs/functions/color/hexToRgba.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ npm install @vtrbo/utils-color

## 使用

### 3/6位`HEX`转换为`RGB`
### 3/6位`HEX`转换为`RGB`

<demo example="color/hexToRgba/hexToRgb.ts"></demo>

### 4/8位`HEX`转换为`RGBA`
### 4/8位`HEX`转换为`RGBA`

<demo example="color/hexToRgba/hexToRgba.ts"></demo>

Expand Down
14 changes: 7 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
},
"devDependencies": {
"@codemirror/theme-one-dark": "^6.1.2",
"@iconify/json": "^2.2.144",
"@vitejs/plugin-vue": "^4.5.0",
"@vueuse/core": "^10.6.1",
"@iconify/json": "^2.2.184",
"@vitejs/plugin-vue": "^5.0.4",
"@vueuse/core": "^10.7.2",
"pretty-format": "^29.7.0",
"sass": "^1.69.5",
"unocss": "^0.57.6",
"vite": "^5.0.0",
"sass": "^1.71.0",
"unocss": "^0.58.5",
"vite": "^5.1.3",
"vite-plugin-externals": "^0.6.2",
"vitepress": "1.0.0-rc.29",
"vue": "^3.3.8"
"vue": "^3.4.19"
}
}
17 changes: 5 additions & 12 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
import antfu, { ignores } from '@antfu/eslint-config'
import eslintConfig from '@antfu/eslint-config'

export default antfu(
export default eslintConfig(
{
typescript: true,
vue: true,
ignores: ['~'],
...ignores(),
rules: {
'no-console': 'off',
'no-new-func': 'off',
'prefer-regex-literals': 'off',
'vue/no-unused-refs': 'off',
'vue/component-name-in-template-casing': 'off',
},
},
{
files: ['**/env.d.ts'],
rules: {
'ts/ban-types': 'off',
'no-new-func': 'off',
'no-console': 'off',
'prefer-regex-literals': 'off',
},
},
)
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,19 @@
"@vtrbo/utils-tree": "workspace:*"
},
"devDependencies": {
"@antfu/eslint-config": "2.0.0",
"@types/node": "^20.9.3",
"@antfu/eslint-config": "^2.6.4",
"@types/node": "^20.11.19",
"@types/shelljs": "^0.8.15",
"bumpp": "^9.2.0",
"eslint": "^8.54.0",
"bumpp": "^9.3.0",
"esno": "^4.0.0",
"lint-staged": "^15.1.0",
"ora": "^7.0.1",
"lint-staged": "^15.2.2",
"ora": "^8.0.1",
"rimraf": "^5.0.5",
"shelljs": "^0.8.5",
"simple-git-hooks": "^2.9.0",
"tsup": "^8.0.0",
"typescript": "^5.3.2",
"vitest": "^0.34.6"
"tsup": "^8.0.2",
"typescript": "^5.3.3",
"vitest": "^1.3.0"
},
"pnpm": {
"patchedDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"clean:deps": "rimraf node_modules"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.5.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vtrbo/utils": "workspace:*",
"vite": "^5.0.0",
"vue": "^3.3.8"
"vite": "^5.1.3",
"vue": "^3.4.19"
}
}
2 changes: 1 addition & 1 deletion playground/src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
declare module '*.vue' {
import type { DefineComponent } from 'vue'

const Component: DefineComponent<{}, {}, any>
const Component: DefineComponent<any, any, any>
export default Component
}
Loading

0 comments on commit f5855d0

Please sign in to comment.