Handle promise linting (#5488)
This commit is contained in:
@@ -139,7 +139,7 @@ class LinkEditor extends React.Component<Props, State> {
|
||||
if (result) {
|
||||
this.save(result.url, result.title);
|
||||
} else if (onCreateLink && selectedIndex === results.length) {
|
||||
this.handleCreateLink(this.suggestedLinkTitle);
|
||||
void this.handleCreateLink(this.suggestedLinkTitle);
|
||||
}
|
||||
} else {
|
||||
// saves the raw input as href
|
||||
@@ -376,8 +376,8 @@ class LinkEditor extends React.Component<Props, State> {
|
||||
subtitle={dictionary.createNewDoc}
|
||||
icon={<PlusIcon />}
|
||||
onPointerMove={() => this.handleFocusLink(results.length)}
|
||||
onClick={() => {
|
||||
this.handleCreateLink(suggestedLinkTitle);
|
||||
onClick={async () => {
|
||||
await this.handleCreateLink(suggestedLinkTitle);
|
||||
|
||||
if (this.initialSelectionLength) {
|
||||
this.moveSelectionToEnd();
|
||||
|
||||
@@ -22,7 +22,7 @@ function LinkSearchResult({
|
||||
const ref = React.useCallback(
|
||||
(node: HTMLElement | null) => {
|
||||
if (selected && node) {
|
||||
scrollIntoView(node, {
|
||||
void scrollIntoView(node, {
|
||||
scrollMode: "if-needed",
|
||||
block: "center",
|
||||
boundary: (parent) =>
|
||||
|
||||
@@ -82,7 +82,7 @@ export default function LinkToolbar({
|
||||
)
|
||||
);
|
||||
|
||||
createAndInsertLink(view, title, href, {
|
||||
return createAndInsertLink(view, title, href, {
|
||||
onCreateLink,
|
||||
onShowToast: showToast,
|
||||
dictionary,
|
||||
|
||||
@@ -54,7 +54,7 @@ function MentionMenu({ search, isActive, ...rest }: Props) {
|
||||
|
||||
React.useEffect(() => {
|
||||
if (isActive) {
|
||||
request();
|
||||
void request();
|
||||
}
|
||||
}, [request, isActive]);
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ export default function SelectionToolbar(props: Props) {
|
||||
.addMark(from, to, markType.create({ href }))
|
||||
);
|
||||
|
||||
createAndInsertLink(view, title, href, {
|
||||
return createAndInsertLink(view, title, href, {
|
||||
onCreateLink,
|
||||
onShowToast,
|
||||
dictionary,
|
||||
|
||||
@@ -25,7 +25,7 @@ function SuggestionsMenuItem({
|
||||
const ref = React.useCallback(
|
||||
(node) => {
|
||||
if (selected && node) {
|
||||
scrollIntoView(node, {
|
||||
void scrollIntoView(node, {
|
||||
scrollMode: "if-needed",
|
||||
block: "nearest",
|
||||
boundary: (parent) =>
|
||||
|
||||
Reference in New Issue
Block a user