fixed warnings from automatic review

This commit is contained in:
poanse 2026-05-16 06:45:22 +03:00
parent d3201de327
commit d9e039e16f
9 changed files with 26 additions and 40 deletions

View file

@ -1,6 +1,5 @@
import esbuild from "esbuild";
import process from "process";
import builtins from "builtin-modules";
import esbuildSvelte from "esbuild-svelte";
import { sveltePreprocess } from "svelte-preprocess";
import fs from "fs";
@ -54,7 +53,6 @@ const context = await esbuild.context({
"@lezer/common",
"@lezer/highlight",
"@lezer/lr",
...builtins,
],
format: "cjs",
target: "es2022",

42
package-lock.json generated
View file

@ -6,7 +6,7 @@
"packages": {
"": {
"name": "obsidian-taskmap",
"version": "0.1.3",
"version": "0.1.5",
"license": "MIT",
"dependencies": {
"@napolab/alpha-blend": "^2.0.0",
@ -24,7 +24,6 @@
"@types/node": "latest",
"@typescript-eslint/eslint-plugin": "latest",
"@typescript-eslint/parser": "latest",
"builtin-modules": "latest",
"esbuild": "latest",
"esbuild-svelte": "^0.9.3",
"eslint": "^9.39.2",
@ -1898,19 +1897,6 @@
"balanced-match": "^1.0.0"
}
},
"node_modules/builtin-modules": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-5.0.0.tgz",
"integrity": "sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=18.20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/call-bind": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
@ -2215,9 +2201,9 @@
}
},
"node_modules/devalue": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.7.1.tgz",
"integrity": "sha512-MUbZ586EgQqdRnC4yDrlod3BEdyvE4TapGYHMW2CiaW+KkkFmWEFqBUaLltEZCGi0iFXCEjRF0OjF0DV2QHjOA==",
"version": "5.8.1",
"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.8.1.tgz",
"integrity": "sha512-4CXDYRBGqN+57wVJkuXBYmpAVUSg3L6JAQa/DFqm238G73E1wuyc/JhGQJzN7vUf/CMphYau2zXbfWzDR5aTEw==",
"license": "MIT"
},
"node_modules/dunder-proto": {
@ -3377,9 +3363,9 @@
"license": "MIT"
},
"node_modules/fast-uri": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",
"integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz",
"integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==",
"dev": true,
"funding": [
{
@ -4848,9 +4834,9 @@
}
},
"node_modules/postcss": {
"version": "8.5.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
"integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
"version": "8.5.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz",
"integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==",
"dev": true,
"funding": [
{
@ -5720,9 +5706,9 @@
}
},
"node_modules/svelte": {
"version": "5.55.3",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-5.55.3.tgz",
"integrity": "sha512-dS1N+i3bA1v+c4UDb750MlN5vCO82G6vxh8HeTsPsTdJ1BLsN1zxSyDlIdBBqUjqZ/BxEwM8UrFf98aaoVnZFQ==",
"version": "5.55.7",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-5.55.7.tgz",
"integrity": "sha512-ymI5ykLPwIHW839E053FQbI1G+jnRFJEw3Kv5Y4njixVWywQBx+NUFpkkKyk5LIb36Fg9DVXSYpqiGekLD0hyw==",
"license": "MIT",
"peer": true,
"dependencies": {
@ -5735,7 +5721,7 @@
"aria-query": "5.3.1",
"axobject-query": "^4.1.0",
"clsx": "^2.1.1",
"devalue": "^5.6.4",
"devalue": "^5.8.1",
"esm-env": "^1.2.1",
"esrap": "^2.2.4",
"is-reference": "^3.0.3",

View file

@ -19,7 +19,6 @@
"@types/node": "latest",
"@typescript-eslint/eslint-plugin": "latest",
"@typescript-eslint/parser": "latest",
"builtin-modules": "latest",
"esbuild": "latest",
"esbuild-svelte": "^0.9.3",
"eslint": "^9.39.2",

View file

@ -180,7 +180,7 @@ export class Context {
public finishTaskDragging = (e: PointerEvent, updatePositions = false) => {
this.draggedTaskId = NoTaskId;
this.taskDraggingManager.onPointerUp(e);
this.taskDraggingManager.onPointerUp();
if (updatePositions) {
this.updateTaskPositions();
}
@ -315,7 +315,7 @@ export class Context {
const taskIdSet: ReadonlySet<TaskId> = new SvelteSet<TaskId>(
this.taskPositions.map((t) => t.taskId),
);
this.positions.forEach((v, k) => {
this.positions.forEach((_v, k) => {
if (k != NoTaskId && !taskIdSet.has(k)) {
this.taskPositions.push({
taskId: k,
@ -426,8 +426,11 @@ export class Context {
this.app.workspace
.getLeavesOfType(TASKMAP_VIEW_TYPE)
.map((leaf) => leaf.view)
.filter((view) => view instanceof TaskmapView)
.forEach((view) => view.debouncedSave());
.forEach((view) => {
if (view instanceof TaskmapView) {
view.debouncedSave();
}
});
}
public addTask(parentId: TaskId): void {

View file

@ -27,7 +27,7 @@ export class DraggingManager {
}
};
public onPointerUp = (e: PointerEvent) => {
public onPointerUp = () => {
console.debug(`DraggingManager pointerUp: ${this.deltaX}`);
this.reset();
};

View file

@ -321,7 +321,7 @@ export class NodePositionsCalculator {
rootChildrenByPriority.set(idx, id);
});
rootChildrenByPriority.forEach((priority, chId) => {
rootChildrenByPriority.forEach((_priority, chId) => {
const x = taskById.get(chId)!;
if (this.RowIndex(x) === 0) {
const neighbourId =

View file

@ -132,7 +132,7 @@
viewportEl!.focus();
e.stopPropagation();
}
draggingManager.onPointerUp(e);
draggingManager.onPointerUp();
context.finishTaskDragging(e, true);
}

View file

@ -33,7 +33,7 @@ export class FolderSuggest extends AbstractInputSuggest<TFolder> {
}
renderSuggestion(file: TFolder, el: HTMLElement) {
el.createEl("div", { text: file.path });
el.createDiv({ text: file.path });
el.createEl("small", { text: file.path, cls: "text-muted" });
}

View file

@ -45,7 +45,7 @@ export class LinkSuggest extends AbstractInputSuggest<TFile> {
}
renderSuggestion(file: TFile, el: HTMLElement) {
el.createEl("div", { text: file.basename });
el.createDiv({ text: file.basename });
el.createEl("small", { text: file.path, cls: "text-muted" });
}