From 5e7d46aaaa6bc3d0fc46afafce8050c291f2705e Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Sun, 16 Jan 2022 19:44:22 +0200 Subject: [PATCH] refactor: :fire: Remove unused imports --- src/Codeblocks.ts | 6 ++++-- src/Commands/CreateIndex.ts | 10 ++-------- src/Views/MatrixView.ts | 10 +++++----- src/main.ts | 1 - src/refreshIndex.ts | 1 - 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/Codeblocks.ts b/src/Codeblocks.ts index f3827ad0..0e80c523 100644 --- a/src/Codeblocks.ts +++ b/src/Codeblocks.ts @@ -96,7 +96,7 @@ export function getCodeblockCB(plugin: BCPlugin) { const allPaths = dfsAllPaths(subClosed, basename); const index = createIndex(allPaths, false); info({ allPaths, index }); - console.log({ allPaths, index }); + const lines = index .split("\n") .map((line) => { @@ -342,7 +342,9 @@ class BCStore extends Component implements ICoreDataStore { console.log("returning empty cache", nodeId); return Promise.resolve(nodeDangling(nodeId.id)); } - return Promise.resolve(nodeFromFile(file, this.plugin, view.settings, nodeId.toId())); + return Promise.resolve( + nodeFromFile(file, this.plugin, view.settings, nodeId.toId()) + ); } } diff --git a/src/Commands/CreateIndex.ts b/src/Commands/CreateIndex.ts index 146bcb83..b9ac7f1e 100644 --- a/src/Commands/CreateIndex.ts +++ b/src/Commands/CreateIndex.ts @@ -1,15 +1,9 @@ import { cloneDeep } from "lodash"; import { info } from "loglevel"; import { copy } from "obsidian-community-lib/dist/utils"; -import { makeWiki } from "../sharedFunctions"; -import { - dfsAllPaths, - getReflexiveClosure, - getSinks, - getSubCloseSub, - getSubInDirs, -} from "../graphUtils"; +import { dfsAllPaths, getSinks, getSubInDirs } from "../graphUtils"; import type BCPlugin from "../main"; +import { makeWiki } from "../sharedFunctions"; /** * Returns a copy of `index`, doesn't mutate. diff --git a/src/Views/MatrixView.ts b/src/Views/MatrixView.ts index 58ef9413..6b7c4963 100644 --- a/src/Views/MatrixView.ts +++ b/src/Views/MatrixView.ts @@ -9,7 +9,7 @@ import { MATRIX_VIEW, TRAIL_ICON, } from "../constants"; -import { getOppDir, getReflexiveClosure, getSubInDirs } from "../graphUtils"; +import { getOppDir, getSubInDirs } from "../graphUtils"; import type { Directions, internalLinkObj, @@ -133,14 +133,14 @@ export default class MatrixView extends ItemView { } = blankRealNImplied(); const resultsFilter = ( - real: SquareItem, + item: SquareItem, dir: Directions, oppDir: Directions, arrow: string ) => - hier[dir].includes(real.field) || - (real.field.includes(`<${arrow}>`) && - hier[oppDir].includes(real.field.split(" <")[0])); + hier[dir].includes(item.field) || + (item.field.includes(`<${arrow}>`) && + hier[oppDir].includes(item.field.split(" <")[0])); for (const dir in realsnImplieds) { const oppDir = getOppDir(dir as Directions); diff --git a/src/main.ts b/src/main.ts index abe71e63..5659fbae 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,7 +6,6 @@ import { wait, waitForResolvedLinks, } from "obsidian-community-lib/dist/utils"; -import { getReflexiveClosure } from "./graphUtils"; import { Debugger } from "src/Debugger"; import { HierarchyNoteSelectorModal } from "./AlternativeHierarchies/HierarchyNotes/HierNoteModal"; import { BCSettingTab } from "./BreadcrumbsSettingTab"; diff --git a/src/refreshIndex.ts b/src/refreshIndex.ts index 2794a358..26167bc9 100644 --- a/src/refreshIndex.ts +++ b/src/refreshIndex.ts @@ -365,7 +365,6 @@ function addAuntsUncles(g: MultiGraph) { g.forEachOutEdge(parentNode, (k, a, s, uncle) => { if (a.dir !== "same") return; - console.log("aunt", currN, uncle); addEdgeIfNot(g, currN, uncle, { dir: "up", // Use the starting nodes parent field