diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-08-11 16:17:30 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-08-19 00:12:43 +0300 |
commit | 806ebeeb5ca4d587a276ce6dda83f431291d1c07 (patch) | |
tree | 550b672243ff710c2fd24fc1b56c4faf469e2dd8 | |
parent | a604767e69359f2cbc1d20fc7b6c2f5c7a1c91f6 (diff) |
Fix eslint errors
Signed-off-by: Julius Härtl <jus@bitgrid.net>
22 files changed, 42 insertions, 40 deletions
diff --git a/src/EditorFactory.js b/src/EditorFactory.js index 95716481b..ba86a2954 100644 --- a/src/EditorFactory.js +++ b/src/EditorFactory.js @@ -30,8 +30,8 @@ import EditableTable from './nodes/EditableTable.js' import { Editor } from '@tiptap/core' import { Emoji, Markdown, PlainText, RichText } from './extensions/index.js' import { translate as t } from '@nextcloud/l10n' -import { listLanguages, registerLanguage } from 'lowlight/lib/core' -import { emojiSearch } from '@nextcloud/vue/dist/Functions/emoji' +import { listLanguages, registerLanguage } from 'lowlight/lib/core.js' +import { emojiSearch } from '@nextcloud/vue/dist/Functions/emoji.js' import { VueRenderer } from '@tiptap/vue-2' import EmojiList from './components/EmojiList.vue' import tippy from 'tippy.js' @@ -43,6 +43,7 @@ const loadSyntaxHighlight = async (language) => { console.info(list) if (!listLanguages().includes(language)) { try { + // eslint-disable-next-line n/no-missing-import const syntax = await import(/* webpackChunkName: "highlight/[request]" */'highlight.js/lib/languages/' + language) registerLanguage(language, syntax.default) } catch (e) { diff --git a/src/components/Editor.vue b/src/components/Editor.vue index 2e7ddadce..b2f72a612 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -33,7 +33,7 @@ :has-connection-issue="hasConnectionIssue" :content-loaded="contentLoaded" :show-author-annotations="showAuthorAnnotations"> - <Main v-if="$editor"> + <MainContainer v-if="$editor"> <MenuBar v-if="renderMenus" ref="menubar" :autohide="autohide" @@ -47,12 +47,13 @@ <slot name="header" /> </MenuBar> <div v-if="!menubarLoaded" class="menubar-placeholder" /> - <Content v-show="contentLoaded" ref="contentWrapper"> + <ContentContainer v-show="contentLoaded" + ref="contentWrapper"> <MenuBubble v-if="renderMenus" :content-wrapper="contentWrapper" :file-path="relativePath" /> - </Content> - </Main> + </ContentContainer> + </MainContainer> <Reader v-if="hasSyncCollission" :content="syncError.data.outsideChange" :is-rich-editor="isRichEditor" /> @@ -97,9 +98,9 @@ import DocumentStatus from './Editor/DocumentStatus.vue' import isMobile from './../mixins/isMobile.js' import store from './../mixins/store.js' import MenuBar from './Menu/MenuBar.vue' -import Content from './Editor/Content.vue' +import ContentContainer from './Editor/ContentContainer.vue' import Status from './Editor/Status.vue' -import Main from './Editor/Main.vue' +import MainContainer from './Editor/MainContainer.vue' import Wrapper from './Editor/Wrapper.vue' const EDITOR_PUSH_DEBOUNCE = 200 @@ -109,8 +110,8 @@ export default { components: { DocumentStatus, Wrapper, - Main, - Content, + MainContainer, + ContentContainer, MenuBar, MenuBubble: () => import(/* webpackChunkName: "editor-rich" */'./MenuBubble.vue'), Reader: () => import(/* webpackChunkName: "editor" */'./Reader.vue'), diff --git a/src/components/Editor/AvatarWrapper.vue b/src/components/Editor/AvatarWrapper.vue index 540422d02..dee4fb33e 100644 --- a/src/components/Editor/AvatarWrapper.vue +++ b/src/components/Editor/AvatarWrapper.vue @@ -14,7 +14,7 @@ </template> <script> -import Avatar from '@nextcloud/vue/dist/Components/Avatar' +import Avatar from '@nextcloud/vue/dist/Components/Avatar.js' export default { name: 'AvatarWrapper', components: { diff --git a/src/components/Editor/Content.vue b/src/components/Editor/ContentContainer.vue index 5bb6ed0f6..233d31473 100644 --- a/src/components/Editor/Content.vue +++ b/src/components/Editor/ContentContainer.vue @@ -45,7 +45,7 @@ import { useOutlineStateMixin } from './Wrapper.provider.js' import EditorOutline from './EditorOutline.vue' export default { - name: 'Content', + name: 'ContentContainer', components: { EditorContent, EditorOutline, diff --git a/src/components/Editor/GuestNameDialog.vue b/src/components/Editor/GuestNameDialog.vue index 4735d568c..7f1890b6d 100644 --- a/src/components/Editor/GuestNameDialog.vue +++ b/src/components/Editor/GuestNameDialog.vue @@ -35,7 +35,7 @@ </template> <script> -import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' +import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js' import { generateUrl } from '@nextcloud/router' import AvatarWrapper from './AvatarWrapper.vue' import { useSyncServiceMixin } from '../Editor.provider.js' diff --git a/src/components/Editor/Main.vue b/src/components/Editor/MainContainer.vue index da7c1d134..3447f3fb3 100644 --- a/src/components/Editor/Main.vue +++ b/src/components/Editor/MainContainer.vue @@ -31,7 +31,7 @@ import MediaHandler from './MediaHandler.vue' export default { - name: 'Main', + name: 'MainContainer', components: { MediaHandler, }, diff --git a/src/components/Editor/SessionList.vue b/src/components/Editor/SessionList.vue index d97a55aff..c01db8542 100644 --- a/src/components/Editor/SessionList.vue +++ b/src/components/Editor/SessionList.vue @@ -62,8 +62,8 @@ </template> <script> -import Popover from '@nextcloud/vue/dist/Components/Popover' -import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' +import Popover from '@nextcloud/vue/dist/Components/Popover.js' +import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js' import AvatarWrapper from './AvatarWrapper.vue' import store from '../../mixins/store.js' diff --git a/src/components/Editor/Status.vue b/src/components/Editor/Status.vue index b78b5b3a7..5acb93168 100644 --- a/src/components/Editor/Status.vue +++ b/src/components/Editor/Status.vue @@ -42,7 +42,7 @@ <script> import { ERROR_TYPE } from './../../services/SyncService.js' -import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' +import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js' import { useIsMobileMixin, useIsPublicMixin, diff --git a/src/components/EmojiList.vue b/src/components/EmojiList.vue index 3b172eb8e..d1652cf5a 100644 --- a/src/components/EmojiList.vue +++ b/src/components/EmojiList.vue @@ -42,7 +42,7 @@ <script> import { translate as t } from '@nextcloud/l10n' -import { addRecent } from '@nextcloud/vue/dist/Functions/emoji' +import { addRecent } from '@nextcloud/vue/dist/Functions/emoji.js' export default { name: 'EmojiList', diff --git a/src/components/HelpModal.vue b/src/components/HelpModal.vue index 96e2dd66f..f801106ee 100644 --- a/src/components/HelpModal.vue +++ b/src/components/HelpModal.vue @@ -158,8 +158,8 @@ </template> <script> -import Modal from '@nextcloud/vue/dist/Components/Modal' -import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' +import Modal from '@nextcloud/vue/dist/Components/Modal.js' +import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js' import isMobile from './../mixins/isMobile.js' export default { diff --git a/src/components/Menu/ActionImageUpload.vue b/src/components/Menu/ActionImageUpload.vue index 4827b9ada..73373f077 100644 --- a/src/components/Menu/ActionImageUpload.vue +++ b/src/components/Menu/ActionImageUpload.vue @@ -55,8 +55,8 @@ </template> <script> -import Actions from '@nextcloud/vue/dist/Components/Actions' -import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' +import Actions from '@nextcloud/vue/dist/Components/Actions.js' +import ActionButton from '@nextcloud/vue/dist/Components/ActionButton.js' import { Loading, Folder, Upload } from '../icons.js' import { useIsPublicMixin } from '../Editor.provider.js' diff --git a/src/components/Menu/ActionList.vue b/src/components/Menu/ActionList.vue index 2912a7289..2c71b3d60 100644 --- a/src/components/Menu/ActionList.vue +++ b/src/components/Menu/ActionList.vue @@ -41,7 +41,7 @@ </template> <script> -import Actions from '@nextcloud/vue/dist/Components/Actions' +import Actions from '@nextcloud/vue/dist/Components/Actions.js' import { BaseActionEntry } from './BaseActionEntry.js' import ActionSingle from './ActionSingle.vue' import { getIsActive } from './utils.js' diff --git a/src/components/Menu/ActionSingle.vue b/src/components/Menu/ActionSingle.vue index 685196b4d..c5b96308a 100644 --- a/src/components/Menu/ActionSingle.vue +++ b/src/components/Menu/ActionSingle.vue @@ -21,8 +21,8 @@ --> <script> -import Button from '@nextcloud/vue/dist/Components/ButtonVue.js' -import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' +import ButtonVue from '@nextcloud/vue/dist/Components/ButtonVue.js' +import ActionButton from '@nextcloud/vue/dist/Components/ActionButton.js' import { BaseActionEntry } from './BaseActionEntry.js' export default { @@ -40,7 +40,7 @@ export default { // to keep it simple, this component handle the small differences return this.isItem ? ActionButton - : Button + : ButtonVue }, bindState() { const { keyshortcuts } = this diff --git a/src/components/Menu/BaseActionEntry.js b/src/components/Menu/BaseActionEntry.js index 5a862d74c..60b1b778e 100644 --- a/src/components/Menu/BaseActionEntry.js +++ b/src/components/Menu/BaseActionEntry.js @@ -22,7 +22,7 @@ /* eslint-disable jsdoc/valid-types */ -import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' +import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js' import debounce from 'debounce' import { useEditorMixin, useIsMobileMixin } from '../Editor.provider.js' diff --git a/src/components/Menu/EmojiPickerAction.vue b/src/components/Menu/EmojiPickerAction.vue index d70a650d7..8218194e8 100644 --- a/src/components/Menu/EmojiPickerAction.vue +++ b/src/components/Menu/EmojiPickerAction.vue @@ -38,7 +38,7 @@ <script> import { BaseActionEntry } from './BaseActionEntry.js' -import EmojiPicker from '@nextcloud/vue/dist/Components/EmojiPicker' +import EmojiPicker from '@nextcloud/vue/dist/Components/EmojiPicker.js' import ButtonVue from '@nextcloud/vue/dist/Components/ButtonVue.js' export default { diff --git a/src/components/MenuBubble.vue b/src/components/MenuBubble.vue index 8e8949e55..47bdad1a1 100644 --- a/src/components/MenuBubble.vue +++ b/src/components/MenuBubble.vue @@ -46,7 +46,7 @@ data-text-bubble-action="add-link" :class="{ 'is-active': isActive('link') }" @click="showLinkMenu()"> - <Link /> + <LinkIcon /> <span class="menububble__buttontext"> {{ isActive('link') ? t('text', 'Update Link') : t('text', 'Add Link') }} </span> @@ -78,18 +78,18 @@ import { BubbleMenu } from '@tiptap/vue-2' import { getMarkAttributes } from '@tiptap/core' import { getCurrentUser } from '@nextcloud/auth' import { loadState } from '@nextcloud/initial-state' -import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' +import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js' import { optimalPath } from './../helpers/files.js' import { useEditorMixin } from './Editor.provider.js' -import { Link, Document, Delete, Check } from '../components/icons.js' +import { LinkIcon, Document, Delete, Check } from '../components/icons.js' export default { name: 'MenuBubble', components: { BubbleMenu, - Link, + LinkIcon, Document, Delete, Check, diff --git a/src/components/PublicFilesEditor.vue b/src/components/PublicFilesEditor.vue index 88c3261e5..77ea505c6 100644 --- a/src/components/PublicFilesEditor.vue +++ b/src/components/PublicFilesEditor.vue @@ -31,7 +31,7 @@ </template> <script> -import Modal from '@nextcloud/vue/dist/Components/Modal' +import Modal from '@nextcloud/vue/dist/Components/Modal.js' export default { name: 'PublicFilesEditor', diff --git a/src/components/icons.js b/src/components/icons.js index 75c539e2f..9c5c72aff 100644 --- a/src/components/icons.js +++ b/src/components/icons.js @@ -116,7 +116,7 @@ export const Help = makeIcon(MDI_Help) export const Image = makeIcon(MDI_Image) export const Images = makeIcon(MDI_Images) export const Info = makeIcon(MDI_Info) -export const Link = makeIcon(MDI_Link) +export const LinkIcon = makeIcon(MDI_Link) export const Lock = makeIcon(MDI_Lock) export const Positive = makeIcon(MDI_Positive) export const Redo = makeIcon(MDI_Redo) diff --git a/src/extensions/PlainText.js b/src/extensions/PlainText.js index 1236ec394..f1b8f6523 100644 --- a/src/extensions/PlainText.js +++ b/src/extensions/PlainText.js @@ -27,7 +27,7 @@ import CodeBlockLowlight from '@tiptap/extension-code-block-lowlight' import Text from '@tiptap/extension-text' /* eslint-enable import/no-named-as-default */ -import lowlight from 'lowlight/lib/core' +import lowlight from 'lowlight/lib/core' // eslint-disable-line n/no-missing-import import PlainTextDocument from './../nodes/PlainTextDocument.js' diff --git a/src/nodes/Table/TableCellView.vue b/src/nodes/Table/TableCellView.vue index 896a17b18..dc3b2f6aa 100644 --- a/src/nodes/Table/TableCellView.vue +++ b/src/nodes/Table/TableCellView.vue @@ -57,8 +57,8 @@ <script> import { NodeViewWrapper, NodeViewContent } from '@tiptap/vue-2' -import Actions from '@nextcloud/vue/dist/Components/Actions' -import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' +import Actions from '@nextcloud/vue/dist/Components/Actions.js' +import ActionButton from '@nextcloud/vue/dist/Components/ActionButton.js' import { TableAddRowBefore, TableAddRowAfter, Delete } from '../../components/icons.js' export default { diff --git a/src/nodes/Table/TableHeaderView.vue b/src/nodes/Table/TableHeaderView.vue index c381f28d4..e08f7902d 100644 --- a/src/nodes/Table/TableHeaderView.vue +++ b/src/nodes/Table/TableHeaderView.vue @@ -57,8 +57,8 @@ <script> import { NodeViewWrapper, NodeViewContent } from '@tiptap/vue-2' -import Actions from '@nextcloud/vue/dist/Components/Actions' -import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' +import Actions from '@nextcloud/vue/dist/Components/Actions.js' +import ActionButton from '@nextcloud/vue/dist/Components/ActionButton.js' import { Delete, TableAddColumnBefore, TableAddColumnAfter } from '../../components/icons.js' export default { diff --git a/src/nodes/Table/TableView.vue b/src/nodes/Table/TableView.vue index 6e92097f7..505a644a9 100644 --- a/src/nodes/Table/TableView.vue +++ b/src/nodes/Table/TableView.vue @@ -46,7 +46,7 @@ <script> import { NodeViewWrapper, NodeViewContent } from '@tiptap/vue-2' import Actions from '@nextcloud/vue/dist/Components/Actions.js' -import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' +import ActionButton from '@nextcloud/vue/dist/Components/ActionButton.js' import { TableSettings, Delete } from '../../components/icons.js' export default { |