Skip to content

Commit 2f19fdf

Browse files
committed
chore: use eslint v9 with flat config
1 parent c1d0ffd commit 2f19fdf

21 files changed

+196
-235
lines changed

Diff for: .eslintrc.js

-36
This file was deleted.

Diff for: eslint.config.mjs

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import eslint from '@eslint/js'
2+
import tseslint from 'typescript-eslint'
3+
import prettierPluginRecommended from 'eslint-plugin-prettier/recommended'
4+
5+
export default [
6+
{
7+
ignores: ['docs/.vitepress', 'coverage', 'dist']
8+
},
9+
...tseslint.config({
10+
extends: [
11+
eslint.configs.recommended,
12+
...tseslint.configs.recommended,
13+
prettierPluginRecommended
14+
],
15+
rules: {
16+
'prettier/prettier': ['error'],
17+
'no-restricted-imports': [
18+
'error',
19+
{
20+
patterns: ['src/*']
21+
}
22+
],
23+
24+
// Currently, disabled to avoid a lot of changes during migration
25+
'@typescript-eslint/no-explicit-any': 'off',
26+
'@typescript-eslint/no-unused-vars': 'off',
27+
'@typescript-eslint/ban-ts-comment': 'off'
28+
}
29+
})
30+
]

Diff for: examples/TodoApp.spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* yarn build. Then you can run this with `yarn test examples`
55
*/
66
import { mount } from '../dist/vue-test-utils.cjs.js'
7+
import { test, expect } from 'vitest'
78

89
import TodoApp from './TodoApp.vue'
910

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@vue/compiler-dom": "3.4.35",
4242
"@vue/compiler-sfc": "3.4.35",
4343
"@vue/server-renderer": "3.4.35",
44-
"eslint": "8.57.0",
44+
"eslint": "9.8.0",
4545
"eslint-config-prettier": "9.1.0",
4646
"eslint-plugin-prettier": "5.2.1",
4747
"husky": "9.1.4",
@@ -77,7 +77,7 @@
7777
"tsd": "tsc -p test-dts/tsconfig.tsd.json",
7878
"build": "rollup -c rollup.config.ts --bundleConfigAsCjs",
7979
"prepare": "rollup -c rollup.config.ts --bundleConfigAsCjs",
80-
"lint": "eslint --ext .ts src/ tests/",
80+
"lint": "eslint .",
8181
"lint:fix": "pnpm run lint --fix",
8282
"docs:dev": "vitepress dev docs",
8383
"docs:build": "vitepress build docs",

0 commit comments

Comments
 (0)