Skip to content

Commit 278fd81

Browse files
committed
upgrade eslint
1 parent 36214fc commit 278fd81

File tree

4 files changed

+222
-55
lines changed

4 files changed

+222
-55
lines changed

.eslintrc.cjs

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

eslint.config.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import pluginVue from 'eslint-plugin-vue'
2+
import {
3+
defineConfigWithVueTs,
4+
vueTsConfigs,
5+
} from '@vue/eslint-config-typescript'
6+
import pluginVitest from '@vitest/eslint-plugin'
7+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
8+
9+
export default defineConfigWithVueTs(
10+
{
11+
name: 'app/files-to-lint',
12+
files: ['**/*.{ts,mts,tsx,vue}'],
13+
},
14+
15+
{
16+
name: 'app/files-to-ignore',
17+
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
18+
},
19+
20+
pluginVue.configs['flat/essential'],
21+
vueTsConfigs.recommended,
22+
23+
{
24+
...pluginVitest.configs.recommended,
25+
files: ['tests/**/*'],
26+
},
27+
skipFormatting,
28+
)

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"test": "vitest --environment jsdom",
3939
"coverage": "vitest --run --coverage --environment jsdom --silent",
4040
"typecheck": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
41-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
41+
"lint": "eslint .",
42+
"lint:fix": "eslint . --fix"
4243
},
4344
"repository": {
4445
"type": "git",
@@ -55,6 +56,7 @@
5556
"@types/node": "^22.13.10",
5657
"@vitejs/plugin-vue": "^5.2.1",
5758
"@vitest/coverage-v8": "^3.0.8",
59+
"@vitest/eslint-plugin": "^1.1.37",
5860
"@vue/eslint-config-prettier": "^10.2.0",
5961
"@vue/eslint-config-typescript": "^14.5.0",
6062
"@vue/test-utils": "^2.4.6",
@@ -73,6 +75,7 @@
7375
"semantic-release": "^24.2.3",
7476
"typescript": "^5.8.2",
7577
"vite": "^6.2.2",
78+
"vite-plugin-vue-devtools": "^7.7.2",
7679
"vitest": "^3.0.8",
7780
"vue": "^3.5.13",
7881
"vue-tsc": "^2.2.8"

0 commit comments

Comments
 (0)