Skip to content

Commit

Permalink
🎨 PNPM Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 16, 2025
1 parent b5a60fc commit 6f98849
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/src/block/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export const showPopover = async (app: App, showRef = false) => {
return;
}
let refDefs: IRefDefs[];
let originalRefBlockIDs: IObject
let originalRefBlockIDs: IObject;
const dataId = popoverTargetElement.getAttribute("data-id");
if (dataId) {
// backlink/util/hint 上的弹层
Expand Down
8 changes: 2 additions & 6 deletions app/src/boot/globalEvent/click.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import {getAllModels} from "../../layout/getAll";
import {
hasClosestByAttribute,
hasClosestByClassName,
hasTopClosestByClassName
} from "../../protyle/util/hasClosest";
import {hasClosestByAttribute, hasClosestByClassName, hasTopClosestByClassName} from "../../protyle/util/hasClosest";
import {hideAllElements} from "../../protyle/ui/hideElements";
import {isWindow} from "../../util/functions";
import {writeText} from "../../protyle/util/compatibility";
Expand All @@ -19,7 +15,7 @@ export const globalClickHideMenu = (element: HTMLElement) => {
window.siyuan.menus.menu.remove();
}
}
}
};

export const globalClick = (event: MouseEvent & { target: HTMLElement }) => {
cancelDrag();
Expand Down
2 changes: 1 addition & 1 deletion app/src/boot/globalEvent/dragover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ export const cancelDrag = () => {
ghostElement.remove();
document.onmousemove = null;
}
}
};
2 changes: 1 addition & 1 deletion app/src/protyle/render/av/openMenuPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ export const openMenuPanel = (options: {
break;
} else if (type === "updateColType") {
if (target.dataset.newType !== target.dataset.oldType) {
const nameElement = avPanelElement.querySelector('.b3-text-field[data-type="name"]') as HTMLInputElement
const nameElement = avPanelElement.querySelector('.b3-text-field[data-type="name"]') as HTMLInputElement;
const name = nameElement.value;
let newName = name;
data.view.columns.find((item: IAVColumn) => {
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/render/av/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
// 需等待渲染完,否则 getBoundingClientRect 错误 https://github.com/siyuan-note/siyuan/issues/13787
setTimeout(() => {
stickyRow(e, editRect, "top");
}, Constants.TIMEOUT_LOAD)
}, Constants.TIMEOUT_LOAD);
}
if (footerTransform) {
(e.querySelector(".av__row--footer") as HTMLElement).style.transform = footerTransform;
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/util/paste.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const pasteAsPlainText = async (protyle: IProtyle) => {
// Inline-level elements support pasted as plain text https://github.com/siyuan-note/siyuan/issues/8010
navigator.clipboard.readText().then(textPlain => {
if (getSelection().rangeCount > 0) {
const range = getSelection().getRangeAt(0)
const range = getSelection().getRangeAt(0);
if (hasClosestByAttribute(range.startContainer, "data-type", "code") || hasClosestByClassName(range.startContainer, "hljs")) {
insertHTML(textPlain.replace(/\u200D```/g, "```").replace(/```/g, "\u200D```"), protyle);
return;
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/wysiwyg/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ const removeLi = (protyle: IProtyle, blockElement: Element, range: Range, isDele
transaction(protyle, doOperations, undoOperations);
if (listElement.parentElement.classList.contains("sb") &&
listElement.parentElement.getAttribute("data-sb-layout") === "col") {
const selectsElement: Element[] = []
const selectsElement: Element[] = [];
let previousElement: Element = listElement;
while (previousElement) {
selectsElement.push(previousElement);
Expand Down

0 comments on commit 6f98849

Please sign in to comment.