From 4e0423b45d64e8e02ffcd70845f0674aef457f54 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Wed, 19 Mar 2025 14:04:04 +0200 Subject: [PATCH] chore: tweak eslint and tsconfig --- eslint.config.mjs | 13 +++++++------ tsconfig.app.json | 15 ++++++++++++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 2b60ca6..038e6b8 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,5 +1,8 @@ import pluginVue from 'eslint-plugin-vue' -import vueTsEslintConfig from '@vue/eslint-config-typescript' +import { + defineConfigWithVueTs, + vueTsConfigs, +} from '@vue/eslint-config-typescript' import { includeIgnoreFile } from '@eslint/compat' import path from 'node:path' import { fileURLToPath } from 'node:url' @@ -8,19 +11,17 @@ const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) const gitignorePath = path.resolve(__dirname, '.gitignore') -export default [ +export default defineConfigWithVueTs([ includeIgnoreFile(gitignorePath), { // your overrides }, ...pluginVue.configs['flat/essential'], - ...vueTsEslintConfig({ - extends: ['recommended'] - }), + vueTsConfigs.recommended, { languageOptions: { ecmaVersion: 'latest', sourceType: 'script' } } -] +]) diff --git a/tsconfig.app.json b/tsconfig.app.json index db4bf17..370e6d9 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -1,13 +1,22 @@ { "extends": "@vue/tsconfig/tsconfig.dom.json", - "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], - "exclude": ["src/**/__tests__/*"], + "include": [ + "env.d.ts", + "vite.config.ts", + "src/**/*", + "src/**/*.vue" + ], + "exclude": [ + "src/**/__tests__/*" + ], "compilerOptions": { "composite": true, "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", "baseUrl": ".", "paths": { - "@/*": ["./src/*"] + "@/*": [ + "./src/*" + ] } } }