From 6c4859f98c41ba27ef8e0fe50630ad3baa3c1975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Fern=C3=A1ndez?= Date: Fri, 16 Jun 2023 17:52:30 -0400 Subject: [PATCH] fix(): fix tsconfig vite and vitest config --- lib/potassium/assets/.eslintrc.json | 1 - lib/potassium/assets/tsconfig.config.json | 16 +++++++++++++--- lib/potassium/assets/tsconfig.json | 16 +++++++++++----- lib/potassium/recipes/front_end_vite.rb | 1 + 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/lib/potassium/assets/.eslintrc.json b/lib/potassium/assets/.eslintrc.json index 5246e761..6b9c666a 100644 --- a/lib/potassium/assets/.eslintrc.json +++ b/lib/potassium/assets/.eslintrc.json @@ -3,7 +3,6 @@ "browser": true, "es2021": true, "node": true, - "vi": true, "vue/setup-compiler-macros": true }, "parserOptions": { diff --git a/lib/potassium/assets/tsconfig.config.json b/lib/potassium/assets/tsconfig.config.json index dfacd345..266d5cb5 100644 --- a/lib/potassium/assets/tsconfig.config.json +++ b/lib/potassium/assets/tsconfig.config.json @@ -1,8 +1,18 @@ { - "extends": "@vue/tsconfig/tsconfig.node.json", - "include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"], + "extends": [ + "@tsconfig/node14/tsconfig.json", + "@vue/tsconfig/tsconfig.json" + ], + "include": [ + "vite.config.*", + "vitest.config.*", + "cypress.config.*", + "playwright.config.*" + ], "compilerOptions": { "composite": true, - "types": ["node", "vitest/globals"] + "types": [ + "node" + ] } } diff --git a/lib/potassium/assets/tsconfig.json b/lib/potassium/assets/tsconfig.json index 00443023..7a60e1ac 100644 --- a/lib/potassium/assets/tsconfig.json +++ b/lib/potassium/assets/tsconfig.json @@ -1,13 +1,19 @@ { - "extends": "@vue/tsconfig/tsconfig.web.json", - "include": ["env.d.ts", "app/**/*", "app/**/*.vue"], + "extends": "@vue/tsconfig/tsconfig.dom.json", + "include": [ + "env.d.ts", + "app/**/*", + "app/**/*.vue" + ], "compilerOptions": { "baseUrl": ".", "paths": { - "@/*": ["./app/frontend/*"] - } + "@/*": [ + "./app/frontend/*" + ] + }, + "types": ["vitest/globals", "vite/client"] }, - "references": [ { "path": "./tsconfig.config.json" diff --git a/lib/potassium/recipes/front_end_vite.rb b/lib/potassium/recipes/front_end_vite.rb index 47d87dab..a6e6320f 100644 --- a/lib/potassium/recipes/front_end_vite.rb +++ b/lib/potassium/recipes/front_end_vite.rb @@ -23,6 +23,7 @@ class Recipes::FrontEndVite < Rails::AppBuilder "vue@#{VUE_VERSION}" ], vue_dev: [ + "@tsconfig/node14", "@vitejs/plugin-vue", "@vue/tsconfig", "vue-tsc"