From 47db3244d1ffb2ae4659c36bb1c927d091904bf5 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 3 May 2022 16:33:18 +0200 Subject: [PATCH] fix: specify file extensions in import statements As recommended in @nextcloud/eslint-config@8.0.0 https://github.com/nextcloud/eslint-config/pull/292 Signed-off-by: Max --- src/EditorFactory.js | 18 +++++++------- src/commands/index.js | 2 +- src/components/EditorWrapper.vue | 34 +++++++++++++-------------- src/components/GuestNameDialog.vue | 2 +- src/components/HelpModal.vue | 2 +- src/components/MenuBar.vue | 6 ++--- src/components/MenuBubble.vue | 4 ++-- src/components/PublicFilesEditor.vue | 2 +- src/components/ReadOnlyEditor.vue | 4 ++-- src/components/SessionList.vue | 2 +- src/components/ViewerComponent.vue | 2 +- src/extensions/UserColor.js | 4 ++-- src/extensions/index.js | 12 +++++----- src/extensions/tracking/TrackState.js | 2 +- src/files.js | 6 ++--- src/helpers/files.js | 8 +++---- src/main.js | 4 ++-- src/markdownit/index.js | 6 ++--- src/marks/Link.js | 4 ++-- src/marks/index.js | 8 +++---- src/mixins/store.js | 2 +- src/nodes/BulletList.js | 2 +- src/nodes/Callouts.js | 2 +- src/nodes/Image.js | 2 +- src/nodes/ImageView.vue | 2 +- src/nodes/Table.js | 3 ++- src/nodes/TableCell.js | 2 +- src/nodes/TableHead.js | 2 +- src/nodes/TableHeadRow.js | 2 +- src/nodes/TableHeader.js | 2 +- src/nodes/index.js | 16 ++++++------- src/plugins/link.js | 2 +- src/public.js | 10 ++++---- src/services/PollingBackend.js | 4 ++-- src/services/SyncService.js | 4 ++-- src/viewer.js | 4 ++-- src/views/DirectEditing.vue | 2 +- src/views/RichWorkspace.vue | 2 +- 38 files changed, 99 insertions(+), 98 deletions(-) diff --git a/src/EditorFactory.js b/src/EditorFactory.js index e52fe2847b1..481e268d1fa 100644 --- a/src/EditorFactory.js +++ b/src/EditorFactory.js @@ -34,15 +34,15 @@ import CodeBlock from '@tiptap/extension-code-block' import CodeBlockLowlight from '@tiptap/extension-code-block-lowlight' import Dropcursor from '@tiptap/extension-dropcursor' import HorizontalRule from '@tiptap/extension-horizontal-rule' -import Table from './nodes/Table' -import TableCell from './nodes/TableCell' -import TableHeader from './nodes/TableHeader' -import TableHeadRow from './nodes/TableHeadRow' -import TableRow from './nodes/TableRow' +import Table from './nodes/Table.js' +import TableCell from './nodes/TableCell.js' +import TableHeader from './nodes/TableHeader.js' +import TableHeadRow from './nodes/TableHeadRow.js' +import TableRow from './nodes/TableRow.js' /* eslint-enable import/no-named-as-default */ import { Editor } from '@tiptap/core' -import { Strong, Italic, Strike, Link, Underline } from './marks' +import { Strong, Italic, Strike, Link, Underline } from './marks/index.js' import { Image, PlainTextDocument, @@ -52,13 +52,13 @@ import { TaskList, TaskItem, Callout, -} from './nodes' -import { HardBreak, Markdown, Emoji } from './extensions' +} from './nodes/index.js' +import { HardBreak, Markdown, Emoji } from './extensions/index.js' import { translate as t } from '@nextcloud/l10n' import lowlight, { listLanguages, registerLanguage } from 'lowlight/lib/core' import { emojiSearch } from '@nextcloud/vue/dist/Functions/emoji' import { VueRenderer } from '@tiptap/vue-2' -import EmojiList from './components/EmojiList' +import EmojiList from './components/EmojiList.vue' import tippy from 'tippy.js' import 'proxy-polyfill' diff --git a/src/commands/index.js b/src/commands/index.js index 0667673af1b..8b40f877446 100644 --- a/src/commands/index.js +++ b/src/commands/index.js @@ -20,7 +20,7 @@ * */ -import listInputRule from './listInputRule' +import listInputRule from './listInputRule.js' export { listInputRule, diff --git a/src/components/EditorWrapper.vue b/src/components/EditorWrapper.vue index f2cfaefa77e..cc41ce0769d 100644 --- a/src/components/EditorWrapper.vue +++ b/src/components/EditorWrapper.vue @@ -92,19 +92,19 @@ import escapeHtml from 'escape-html' import moment from '@nextcloud/moment' import { showError } from '@nextcloud/dialogs' -import { EDITOR, SYNC_SERVICE } from './EditorWrapper.provider' +import { EDITOR, SYNC_SERVICE } from './EditorWrapper.provider.js' -import { SyncService, ERROR_TYPE, IDLE_TIMEOUT } from './../services/SyncService' -import { endpointUrl, getRandomGuestName } from './../helpers' -import { extensionHighlight } from '../helpers/mappings' -import { createEditor, serializePlainText, loadSyntaxHighlight } from './../EditorFactory' -import { createMarkdownSerializer } from './../extensions/Markdown' -import markdownit from './../markdownit' +import { SyncService, ERROR_TYPE, IDLE_TIMEOUT } from './../services/SyncService.js' +import { endpointUrl, getRandomGuestName } from './../helpers/index.js' +import { extensionHighlight } from '../helpers/mappings.js' +import { createEditor, serializePlainText, loadSyntaxHighlight } from './../EditorFactory.js' +import { createMarkdownSerializer } from './../extensions/Markdown.js' +import markdownit from './../markdownit/index.js' import { EditorContent } from '@tiptap/vue-2' -import { Collaboration, Keymap, UserColor } from './../extensions' -import isMobile from './../mixins/isMobile' -import store from './../mixins/store' +import { Collaboration, Keymap, UserColor } from './../extensions/index.js' +import isMobile from './../mixins/isMobile.js' +import store from './../mixins/store.js' import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' import { getVersion, receiveTransaction } from 'prosemirror-collab' import { Step } from 'prosemirror-transform' @@ -127,13 +127,13 @@ export default { name: 'EditorWrapper', components: { EditorContent, - MenuBar: () => import(/* webpackChunkName: "editor-rich" */'./MenuBar'), - MenuBubble: () => import(/* webpackChunkName: "editor-rich" */'./MenuBubble'), - ReadOnlyEditor: () => import(/* webpackChunkName: "editor" */'./ReadOnlyEditor'), - CollisionResolveDialog: () => import(/* webpackChunkName: "editor" */'./CollisionResolveDialog'), - GuestNameDialog: () => import(/* webpackChunkName: "editor-guest" */'./GuestNameDialog'), - SessionList: () => import(/* webpackChunkName: "editor-collab" */'./SessionList'), - HelpModal: () => import(/* webpackChunkName: "editor-collab" */'./HelpModal'), + MenuBar: () => import(/* webpackChunkName: "editor-rich" */'./MenuBar.vue'), + MenuBubble: () => import(/* webpackChunkName: "editor-rich" */'./MenuBubble.vue'), + ReadOnlyEditor: () => import(/* webpackChunkName: "editor" */'./ReadOnlyEditor.vue'), + CollisionResolveDialog: () => import(/* webpackChunkName: "editor" */'./CollisionResolveDialog.vue'), + GuestNameDialog: () => import(/* webpackChunkName: "editor-guest" */'./GuestNameDialog.vue'), + SessionList: () => import(/* webpackChunkName: "editor-collab" */'./SessionList.vue'), + HelpModal: () => import(/* webpackChunkName: "editor-collab" */'./HelpModal.vue'), Lock, }, directives: { diff --git a/src/components/GuestNameDialog.vue b/src/components/GuestNameDialog.vue index 77b4cc03ab7..370b787545c 100644 --- a/src/components/GuestNameDialog.vue +++ b/src/components/GuestNameDialog.vue @@ -35,7 +35,7 @@ import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' import Avatar from '@nextcloud/vue/dist/Components/Avatar' import { generateUrl } from '@nextcloud/router' -import { useSyncServiceMixin } from './EditorWrapper.provider' +import { useSyncServiceMixin } from './EditorWrapper.provider.js' export default { name: 'GuestNameDialog', diff --git a/src/components/HelpModal.vue b/src/components/HelpModal.vue index 86d0aaf13e7..a5fd44c3cb9 100644 --- a/src/components/HelpModal.vue +++ b/src/components/HelpModal.vue @@ -160,7 +160,7 @@