chore: fix eslint crashing issues (#1951)

This commit is contained in:
Mo
2022-11-04 17:09:54 -05:00
committed by GitHub
parent 5aa36ff071
commit 417c90a6f2
118 changed files with 315 additions and 424 deletions

View File

@@ -214,9 +214,9 @@ const ContentListView: FunctionComponent<Props> = ({
const panelResizeFinishCallback: ResizeFinishCallback = useCallback(
(width, _lastLeft, _isMaxWidth, isCollapsed) => {
if (selectedAsTag) {
navigationController.setPanelWidthForTag(selectedAsTag, width)
void navigationController.setPanelWidthForTag(selectedAsTag, width)
} else {
application.setPreference(PrefKey.NotesPanelWidth, width).catch(console.error)
void application.setPreference(PrefKey.NotesPanelWidth, width).catch(console.error)
}
application.publishPanelDidResizeEvent(PANEL_NAME_NOTES, isCollapsed)
},

View File

@@ -113,7 +113,7 @@ const DailyContentList: FunctionComponent<Props> = ({
const onClickTemplate = useCallback(
(date: Date) => {
setSelectedDay(date)
itemListController.createNewNote(undefined, date, 'editor')
void itemListController.createNewNote(undefined, date, 'editor')
toggleAppPane(AppPaneId.Editor)
},
[setSelectedDay, itemListController, toggleAppPane],

View File

@@ -101,7 +101,7 @@ const DisplayOptionsMenu: FunctionComponent<DisplayOptionsMenuProps> = ({
)
const resetTagPreferences = useCallback(() => {
application.mutator.changeAndSaveItem<TagMutator>(selectedTag, (mutator) => {
void application.mutator.changeAndSaveItem<TagMutator>(selectedTag, (mutator) => {
mutator.preferences = undefined
})
}, [application, selectedTag])

View File

@@ -101,7 +101,7 @@ const NewNotePreferences: FunctionComponent<Props> = ({
const setNewNoteTitleFormatChange = (value: string) => {
setNewNoteTitleFormat(value as NewNoteTitleFormat)
if (mode === 'global') {
application.setPreference(PrefKey.NewNoteTitleFormat, value as NewNoteTitleFormat)
void application.setPreference(PrefKey.NewNoteTitleFormat, value as NewNoteTitleFormat)
} else {
void changePreferencesCallback({ newNoteTitleFormat: value as NewNoteTitleFormat })
}
@@ -168,7 +168,7 @@ const NewNotePreferences: FunctionComponent<Props> = ({
if (mode === 'tag') {
void changePreferencesCallback({ customNoteTitleFormat: newFormat })
} else {
application.setPreference(PrefKey.CustomNoteTitleFormat, newFormat)
void application.setPreference(PrefKey.CustomNoteTitleFormat, newFormat)
}
}, PrefChangeDebounceTimeInMs)
}