Replace vetur with volar, small types cleanup

This commit is contained in:
Max Leiter 2022-06-01 11:45:08 -07:00
parent ee887197c9
commit 19d5beb562
No known key found for this signature in database
GPG key ID: A3512F2F2F17EBDA
6 changed files with 9 additions and 25 deletions

View file

@ -3,7 +3,8 @@
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"octref.vetur"
"Vue.volar",
"Vue.vscode-typescript-vue-plugin"
],
"unwantedRecommendations": []
}

View file

@ -1,6 +1,5 @@
{
"editor.formatOnSave": true,
"vetur.format.enable": false,
"prettier.useEditorConfig": true,
"prettier.requireConfig": true,
"prettier.disableLanguages": [],

19
client/js/types.d.ts vendored
View file

@ -8,13 +8,6 @@ import {Mention} from "../../src/client";
import {ClientConfiguration} from "../../src/server";
import {LinkPreview} from "../../src/plugins/irc-events/link";
// declare module '*.vue' {
// import { defineComponent } from 'vue';
// const component: ReturnType<typeof defineComponent>;
// export default component;
// }
interface LoungeWindow extends Window {
g_TheLoungeRemoveLoading?: () => void;
navigator: Window["navigator"] & {
@ -74,18 +67,6 @@ type ClientLinkPreview = LinkPreview & {
sourceLoaded?: boolean;
};
declare module "*.vue" {
const Component: ReturnType<typeof defineComponent>;
export default Component;
}
declare module "vue" {
// interface ComponentCustomProperties {
// // TODO: Vue struggles with typing using the options API, so we should switch to composition API
// // $root
// }
}
declare module "vue-router" {
import Vue from "./vue";

7
client/shims-vue.d.ts vendored Normal file
View file

@ -0,0 +1,7 @@
// https://vuejs.github.io/vetur/guide/setup.html#vue3
declare module "*.vue" {
import type {DefineComponent} from "vue";
// eslint-disable-next-line @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>;
export default component;
}

View file

@ -11,6 +11,5 @@ require:
# - "jsdom-global/register"
- "test/fixtures/env.ts"
globals:
- "__VUE_OPTIONS_API__"
- "__VUE_PROD_DEVTOOLS__"
- "__VUE__"

View file

@ -1,3 +0,0 @@
module.exports = {
projects: ["./client/tsconfig.json"],
};