From 6be07b1001291269948f439d0d70504aee399cf4 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 31 Jan 2021 17:06:52 +0100 Subject: [PATCH] [Vue3] Fixed Components with components options definied. Fixed config files. --- .vscode/settings.json | 4 +++- package.json | 7 ++++--- quasar.conf.js | 9 +++++---- src/shims-vue.d.ts | 9 +++++++++ 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ae2ea04..5041d4d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,5 +25,7 @@ } }, "vetur.format.defaultFormatter.ts": "prettier-tslint", - "typescript.format.enable": false + "typescript.format.enable": false, + "prettier.packageManager": "yarn", + "prettier.configPath": "./package.json" } diff --git a/package.json b/package.json index a605a84..46d0c14 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "author": "Tim Gröger ", "private": true, "scripts": { - "lint": "eslint --ext .js,.ts,.vue ./", - "test": "echo \"No test specified\" && exit 0" + "format": "prettier --config ./package.json --write '{,!(node_modules)/**/}*.ts'", + "lint": "eslint --ext .js,.ts,.vue ./" }, "dependencies": { "@quasar/extras": "^1.9.10", @@ -20,7 +20,8 @@ "prettier": { "singleQuote": true, "semi": true, - "printWidth": 100 + "printWidth": 100, + "arrowParens": "always" }, "devDependencies": { "@quasar/app": "^3.0.0-alpha.8", diff --git a/quasar.conf.js b/quasar.conf.js index a398ad9..ef6bb05 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -7,10 +7,11 @@ // https://quasar.dev/quasar-cli/quasar-conf-js /* eslint-env node */ -import ESLintPlugin from 'eslint-webpack-plugin'; -import { configure } from 'quasar/wrappers'; - -export default configure(function (/* ctx */) { +/* eslint-disable @typescript-eslint/no-var-requires */ +const ESLintPlugin = require('eslint-webpack-plugin') +const { configure } = require('quasar/wrappers'); + +module.exports = configure(function (/* ctx */) { return { // https://quasar.dev/quasar-cli/supporting-ts // https://quasar.dev/quasar-cli/supporting-ts diff --git a/src/shims-vue.d.ts b/src/shims-vue.d.ts index b196268..a0bd87b 100644 --- a/src/shims-vue.d.ts +++ b/src/shims-vue.d.ts @@ -1,5 +1,14 @@ +//https://github.com/vuejs/vue-next/issues/3130 +declare module '*.vue' { + import { ComponentOptions } from 'vue'; + const component: ComponentOptions; + export default component; +} + +/* // Mocks all files ending in `.vue` showing them as plain Vue instances declare module '*.vue' { import Vue from 'vue'; export default Vue; } +*/