1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-06 09:19:22 +02:00

Tools: Apply rule @typescript-eslint/member-delimiter-style

This commit is contained in:
Laurent Cozic
2020-11-12 19:29:22 +00:00
parent 42799b0662
commit 17d835d694
103 changed files with 964 additions and 953 deletions

View File

@@ -18,19 +18,19 @@ export enum ContextMenuItemType {
}
export interface ContextMenuOptions {
itemType: ContextMenuItemType,
resourceId: string,
linkToCopy: string,
textToCopy: string,
htmlToCopy: string,
insertContent: Function,
isReadOnly?: boolean,
itemType: ContextMenuItemType;
resourceId: string;
linkToCopy: string;
textToCopy: string;
htmlToCopy: string;
insertContent: Function;
isReadOnly?: boolean;
}
interface ContextMenuItem {
label: string,
onAction: Function,
isActive: Function,
label: string;
onAction: Function;
isActive: Function;
}
interface ContextMenuItems {

View File

@@ -24,25 +24,25 @@ export interface NoteEditorProps {
selectedNoteTags: any[];
lastEditorScrollPercents: any;
selectedNoteHash: string;
searches: any[],
selectedSearchId: string,
customCss: string,
noteVisiblePanes: string[],
watchedResources: any,
highlightedWords: any[],
plugins: PluginStates,
toolbarButtonInfos: ToolbarButtonInfo[],
setTagsToolbarButtonInfo: ToolbarButtonInfo,
searches: any[];
selectedSearchId: string;
customCss: string;
noteVisiblePanes: string[];
watchedResources: any;
highlightedWords: any[];
plugins: PluginStates;
toolbarButtonInfos: ToolbarButtonInfo[];
setTagsToolbarButtonInfo: ToolbarButtonInfo;
}
export interface NoteBodyEditorProps {
style: any;
ref: any,
ref: any;
themeId: number;
content: string,
contentKey: string,
contentMarkupLanguage: number,
contentOriginalCss: string,
content: string;
contentKey: string;
contentMarkupLanguage: number;
contentOriginalCss: string;
onChange(event: OnChangeEvent): void;
onWillChange(event: any): void;
onMessage(event: any): void;
@@ -53,29 +53,29 @@ export interface NoteBodyEditorProps {
disabled: boolean;
dispatch: Function;
noteToolbar: any;
setLocalSearchResultCount(count: number): void,
searchMarkers: any,
visiblePanes: string[],
keyboardMode: string,
resourceInfos: ResourceInfos,
locale: string,
onDrop: Function,
noteToolbarButtonInfos: ToolbarButtonInfo[],
plugins: PluginStates,
setLocalSearchResultCount(count: number): void;
searchMarkers: any;
visiblePanes: string[];
keyboardMode: string;
resourceInfos: ResourceInfos;
locale: string;
onDrop: Function;
noteToolbarButtonInfos: ToolbarButtonInfo[];
plugins: PluginStates;
}
export interface FormNote {
id: string,
title: string,
body: string,
parent_id: string,
is_todo: number,
bodyEditorContent?: any,
markup_language: number,
user_updated_time: number,
encryption_applied: number,
id: string;
title: string;
body: string;
parent_id: string;
is_todo: number;
bodyEditorContent?: any;
markup_language: number;
user_updated_time: number;
encryption_applied: number;
hasChanged: boolean,
hasChanged: boolean;
// Getting the content from the editor can be a slow process because that content
// might need to be serialized first. For that reason, the wrapped editor (eg TinyMCE)
@@ -93,10 +93,10 @@ export interface FormNote {
// types something then quickly switch a different note. In that case, bodyWillChangeId
// is set, thus we know we should save the note, even though we won't receive the
// onChange event.
bodyWillChangeId: number
bodyChangeId: number,
bodyWillChangeId: number;
bodyChangeId: number;
saveActionQueue: AsyncActionQueue,
saveActionQueue: AsyncActionQueue;
// Note with markup_language = HTML have a block of CSS at the start, which is used
// to preserve the style from the original (web-clipped) page. When sending the note
@@ -106,7 +106,7 @@ export interface FormNote {
// Since the CSS used by TinyMCE has been lost (since it's in a temp CSS file), we keep that
// original CSS here. It's used in formNoteToNote to rebuild the note body.
// We can keep it here because we know TinyMCE will not modify it anyway.
originalCss: string,
originalCss: string;
}
export function defaultFormNote(): FormNote {
@@ -128,12 +128,12 @@ export function defaultFormNote(): FormNote {
}
export interface ResourceInfo {
localState: any,
item: any,
localState: any;
item: any;
}
export interface ResourceInfos {
[index: string]: ResourceInfo,
[index: string]: ResourceInfo;
}
export enum ScrollOptionTypes {
@@ -143,8 +143,8 @@ export enum ScrollOptionTypes {
}
export interface ScrollOptions {
type: ScrollOptionTypes,
value: any,
type: ScrollOptionTypes;
value: any;
}
export interface OnChangeEvent {

View File

@@ -2,7 +2,7 @@ import { useCallback } from 'react';
const Note = require('@joplin/lib/models/Note.js');
interface HookDependencies {
editorRef: any,
editorRef: any;
}
export default function useDropHandler(dependencies: HookDependencies) {

View File

@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
const Folder = require('@joplin/lib/models/Folder');
interface HookDependencies {
folderId: string,
folderId: string;
}
export default function(dependencies: HookDependencies) {

View File

@@ -14,17 +14,17 @@ const DecryptionWorker = require('@joplin/lib/services/DecryptionWorker.js');
const ResourceEditWatcher = require('@joplin/lib/services/ResourceEditWatcher/index').default;
export interface OnLoadEvent {
formNote: FormNote,
formNote: FormNote;
}
interface HookDependencies {
syncStarted: boolean,
noteId: string,
isProvisional: boolean,
titleInputRef: any,
editorRef: any,
onBeforeLoad(event: OnLoadEvent): void,
onAfterLoad(event: OnLoadEvent): void,
syncStarted: boolean;
noteId: string;
isProvisional: boolean;
titleInputRef: any;
editorRef: any;
onBeforeLoad(event: OnLoadEvent): void;
onAfterLoad(event: OnLoadEvent): void;
}
function installResourceChangeHandler(onResourceChangeHandler: Function) {

View File

@@ -9,14 +9,14 @@ const { themeStyle } = require('@joplin/lib/theme');
const Note = require('@joplin/lib/models/Note');
interface HookDependencies {
themeId: number,
customCss: string,
plugins: PluginStates,
themeId: number;
customCss: string;
plugins: PluginStates;
}
interface MarkupToHtmlOptions {
replaceResourceInternalToExternalLinks?: boolean,
resourceInfos?: ResourceInfos,
replaceResourceInternalToExternalLinks?: boolean;
resourceInfos?: ResourceInfos;
}
export default function useMarkupToHtml(deps: HookDependencies) {

View File

@@ -2,11 +2,11 @@ import { useState, useCallback } from 'react';
import { SearchMarkers } from './useSearchMarkers';
interface LocalSearch {
query: string,
selectedIndex: number,
resultCount: number,
searching: boolean,
timestamp: number,
query: string;
selectedIndex: number;
resultCount: number;
searching: boolean;
timestamp: number;
}
function defaultLocalSearch(): LocalSearch {

View File

@@ -1,14 +1,14 @@
import { useMemo } from 'react';
interface SearchMarkersOptions {
searchTimestamp: number,
selectedIndex: number,
separateWordSearch: boolean,
searchTimestamp: number;
selectedIndex: number;
separateWordSearch: boolean;
}
export interface SearchMarkers {
keywords: any[],
options: SearchMarkersOptions,
keywords: any[];
options: SearchMarkersOptions;
}
function defaultSearchMarkers(): SearchMarkers {

View File

@@ -12,13 +12,13 @@ const commandsWithDependencies = [
];
interface HookDependencies {
formNote: FormNote,
setShowLocalSearch: Function,
dispatch: Function,
noteSearchBarRef: any,
editorRef: any,
titleInputRef: any,
saveNoteAndWait: Function,
formNote: FormNote;
setShowLocalSearch: Function;
dispatch: Function;
noteSearchBarRef: any;
editorRef: any;
titleInputRef: any;
saveNoteAndWait: Function;
}
function editorCommandRuntime(declaration: CommandDeclaration, editorRef: any): CommandRuntime {