refactor: turn on verbatimModuleSyntax

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/900/head
Varun Patil 2023-10-29 17:54:53 -07:00
parent d94841ad6b
commit ff00424e3e
22 changed files with 29 additions and 29 deletions

View File

@ -1,4 +1,4 @@
import { expect, PlaywrightTestArgs } from '@playwright/test'; import { expect, type PlaywrightTestArgs } from '@playwright/test';
export function login(route: string) { export function login(route: string) {
return async ({ page }: PlaywrightTestArgs) => { return async ({ page }: PlaywrightTestArgs) => {

View File

@ -21,7 +21,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import Cluster from './frame/Cluster.vue'; import Cluster from './frame/Cluster.vue';

View File

@ -50,7 +50,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import * as utils from '@services/utils'; import * as utils from '@services/utils';

View File

@ -36,7 +36,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import { showError } from '@nextcloud/dialogs'; import { showError } from '@nextcloud/dialogs';

View File

@ -1,4 +1,4 @@
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import axios from '@nextcloud/axios'; import axios from '@nextcloud/axios';
const NcCheckboxRadioSwitch = () => import('@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch'); const NcCheckboxRadioSwitch = () => import('@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch');

View File

@ -33,7 +33,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import NcCounterBubble from '@nextcloud/vue/dist/Components/NcCounterBubble'; import NcCounterBubble from '@nextcloud/vue/dist/Components/NcCounterBubble';

View File

@ -24,7 +24,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import UserConfig from '@mixins/UserConfig'; import UserConfig from '@mixins/UserConfig';

View File

@ -71,7 +71,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import * as utils from '@services/utils'; import * as utils from '@services/utils';

View File

@ -11,7 +11,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import * as utils from '@services/utils'; import * as utils from '@services/utils';

View File

@ -127,7 +127,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import Magnify from 'vue-material-design-icons/Magnify.vue'; import Magnify from 'vue-material-design-icons/Magnify.vue';
import Close from 'vue-material-design-icons/Close.vue'; import Close from 'vue-material-design-icons/Close.vue';

View File

@ -88,7 +88,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import { showError } from '@nextcloud/dialogs'; import { showError } from '@nextcloud/dialogs';
import NcButton from '@nextcloud/vue/dist/Components/NcButton'; import NcButton from '@nextcloud/vue/dist/Components/NcButton';

View File

@ -73,7 +73,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import Fuse from 'fuse.js'; import Fuse from 'fuse.js';

View File

@ -31,7 +31,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import NcButton from '@nextcloud/vue/dist/Components/NcButton'; import NcButton from '@nextcloud/vue/dist/Components/NcButton';
const NcListItem = () => import('@nextcloud/vue/dist/Components/NcListItem'); const NcListItem = () => import('@nextcloud/vue/dist/Components/NcListItem');

View File

@ -6,8 +6,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent, type Component } from 'vue';
import { Component } from 'vue';
import UserMixin from '@mixins/UserConfig'; import UserMixin from '@mixins/UserConfig';

View File

@ -8,13 +8,13 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import axios from '@nextcloud/axios'; import axios from '@nextcloud/axios';
import { showError, showSuccess } from '@nextcloud/dialogs'; import { showError, showSuccess } from '@nextcloud/dialogs';
import { getLanguage } from '@nextcloud/l10n'; import { getLanguage } from '@nextcloud/l10n';
import { FilerobotImageEditorConfig } from 'react-filerobot-image-editor'; import type { FilerobotImageEditorConfig } from 'react-filerobot-image-editor';
import translations from './ImageEditorTranslations'; import translations from './ImageEditorTranslations';

View File

@ -3,7 +3,7 @@ import PhotoSwipe from 'photoswipe';
import { isVideoContent } from './PsVideo'; import { isVideoContent } from './PsVideo';
import { isLiveContent } from './PsLivePhoto'; import { isLiveContent } from './PsLivePhoto';
import { fetchImage } from '../frame/XImgCache'; import { fetchImage } from '../frame/XImgCache';
import { PsContent, PsEvent, PsSlide } from './types'; import type { PsContent, PsEvent, PsSlide } from './types';
import errorsvg from '@assets/error.svg'; import errorsvg from '@assets/error.svg';

View File

@ -10,8 +10,8 @@ import { API } from '@services/API';
import type { PsContent, PsEvent } from './types'; import type { PsContent, PsEvent } from './types';
import Player from 'video.js/dist/types/player'; import type Player from 'video.js/dist/types/player';
import { QualityLevelList } from 'videojs-contrib-quality-levels'; import type { QualityLevelList } from 'videojs-contrib-quality-levels';
type VideoContent = PsContent & { type VideoContent = PsContent & {
videoElement: HTMLVideoElement | null; videoElement: HTMLVideoElement | null;

View File

@ -185,7 +185,7 @@ import * as utils from '@services/utils';
import * as nativex from '@native'; import * as nativex from '@native';
import ImageEditor from './ImageEditor.vue'; import ImageEditor from './ImageEditor.vue';
import PhotoSwipe, { PhotoSwipeOptions } from 'photoswipe'; import PhotoSwipe, { type PhotoSwipeOptions } from 'photoswipe';
import 'photoswipe/style.css'; import 'photoswipe/style.css';
import PsImage from './PsImage'; import PsImage from './PsImage';
import PsVideo from './PsVideo'; import PsVideo from './PsVideo';

View File

@ -1,5 +1,5 @@
import Content from 'photoswipe/dist/types/slide/content'; import Content from 'photoswipe/dist/types/slide/content';
import Slide, { _SlideData } from 'photoswipe/dist/types/slide/slide'; import Slide, { type _SlideData } from 'photoswipe/dist/types/slide/slide';
import type { IPhoto, IConfig } from '@typings'; import type { IPhoto, IConfig } from '@typings';
type PsAugment = { type PsAugment = {

View File

@ -1,4 +1,4 @@
import Router, { Route, RouteConfig } from 'vue-router'; import Router, { type Route, type RouteConfig } from 'vue-router';
import Vue from 'vue'; import Vue from 'vue';
import { generateUrl } from '@nextcloud/router'; import { generateUrl } from '@nextcloud/router';

View File

@ -17,6 +17,7 @@
"strictNullChecks": true, "strictNullChecks": true,
"alwaysStrict": true, "alwaysStrict": true,
"incremental": true, "incremental": true,
"verbatimModuleSyntax": true,
"paths": { "paths": {
"@services/*": [ "@services/*": [
"./src/services/*" "./src/services/*"

View File

@ -1,10 +1,10 @@
import webpack from 'webpack'; const webpack = require('webpack');
import path from 'path'; const path = require('path');
import WorkboxPlugin from 'workbox-webpack-plugin'; const WorkboxPlugin = require('workbox-webpack-plugin');
import TerserPlugin from 'terser-webpack-plugin'; const TerserPlugin = require('terser-webpack-plugin');
import NodePolyfillPlugin from 'node-polyfill-webpack-plugin'; const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
import { VueLoaderPlugin } from 'vue-loader'; const { VueLoaderPlugin } = require('vue-loader');
const appName = process.env.npm_package_name!; const appName = process.env.npm_package_name!;
const appVersion = process.env.npm_package_version!; const appVersion = process.env.npm_package_version!;