Skip to content

Commit 6874dab

Browse files
committed
chore: eslint
1 parent 6874ec6 commit 6874dab

File tree

4 files changed

+187
-87
lines changed

4 files changed

+187
-87
lines changed

.vscode/extensions.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

eslint.config.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import pluginVue from 'eslint-plugin-vue'
22
import globals from 'globals'
3-
import { defineConfig, globalIgnores } from 'eslint/config'
43

5-
export default defineConfig([
6-
...pluginVue.configs['flat/recommended'],
4+
import { globalIgnores } from 'eslint/config'
5+
6+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
7+
8+
export default defineConfigWithVueTs([
9+
...pluginVue.configs['flat/essential'],
10+
vueTsConfigs.recommended,
711
globalIgnores(['dist/*', 'node_modules/*', 'patches/*', 'types/*']),
812
{
913
rules: {
@@ -15,12 +19,6 @@ export default defineConfig([
1519
'no-sparse-arrays': 0,
1620
'no-inner-declarations': 0,
1721
'no-constant-condition': 0,
18-
'no-restricted-imports': [
19-
'error',
20-
{
21-
paths: ['vue-hooks-plus', '..', '../..', 'packages/hooks/src/index.ts'],
22-
},
23-
],
2422
'no-unused-vars': [
2523
2,
2624
{

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"@vue-hooks-plus/vitepress": "^1.2.4",
5050
"@vue-hooks-plus/vitepress-demo-block": "workspace:^1.0.0",
5151
"@vue/compiler-core": "^3.2.37",
52+
"@vue/eslint-config-typescript": "^14.5.0",
5253
"@vue/test-utils": "^2.1.0",
5354
"axios": "^1.4.0",
5455
"broadcast-channel": "^5.1.0",
@@ -82,6 +83,7 @@
8283
"vitest": "2.x",
8384
"vue": "^3.2.25",
8485
"vue-demi": "^0.13.11",
86+
"vue-hooks-plus": "workspace:*",
8587
"vue-tsc": "1.0.9",
8688
"vue-typical": "^2.1.0"
8789
},

0 commit comments

Comments
 (0)