mirror of
https://github.com/nebulousnessie/Obsidian-MOCBlocks.git
synced 2026-07-22 06:44:20 +00:00
More lint rolling.
This commit is contained in:
parent
9741776d2e
commit
87f0e0c8ae
5 changed files with 13 additions and 13 deletions
|
|
@ -129,7 +129,7 @@ export function renderPinMarker(
|
|||
|
||||
const onDocMouseUp = () => {
|
||||
// Wrap async logic in an IIFE so the registered handler returns void
|
||||
(async () => {
|
||||
void (async () => {
|
||||
if (isDragging) {
|
||||
isDragging = false;
|
||||
|
||||
|
|
@ -376,7 +376,7 @@ export function addResizeHandle(
|
|||
|
||||
const onMouseUp = () => {
|
||||
// Wrap async logic in an IIFE so the registered handler returns void
|
||||
(async () => {
|
||||
void (async () => {
|
||||
if (isResizing) {
|
||||
isResizing = false;
|
||||
document.body.classList.remove("mocblockRenderer-userselect-none");
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export function getStyledIconSVG(
|
|||
});
|
||||
|
||||
return svg.outerHTML;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Plugin, TFile, MarkdownView, parseYaml, Component, WorkspaceLeaf, MarkdownPostProcessorContext } from "obsidian";
|
||||
import { Plugin, TFile, MarkdownView, parseYaml, Component, MarkdownPostProcessorContext } from "obsidian";
|
||||
|
||||
import { loadMarkerDataMD, saveUpdatedMarker, refreshMOCBlock, deleteMarkerFromFile } from "./helpers";
|
||||
import { MOCBlockSettings, DEFAULT_SETTINGS, MOCBlockSettingTab } from "./settings";
|
||||
|
|
@ -85,8 +85,8 @@ export default class MOCBlockPlugin extends Plugin {
|
|||
config = normalizedConfig as MocConfig;
|
||||
|
||||
} catch (e) {
|
||||
console.error("Invalid YAML in moc block", e);
|
||||
el.createEl("pre", { text: "Invalid yaml in moc block." });
|
||||
console.error("Invalid YAML in moc block.", e);
|
||||
el.createEl("pre", { text: "Invalid YAML in moc block." });
|
||||
return;
|
||||
}
|
||||
// --------------------------------
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ export class NewPinModal extends Modal {
|
|||
new Setting(contentEl)
|
||||
.setName("Style")
|
||||
.addDropdown(drop => {
|
||||
Object.keys(this.styleNames).forEach(key => drop.addOption(key, this.styleNames[key].styleName ?? key));
|
||||
Object.keys(this.styleNames).forEach(key => void drop.addOption(key, this.styleNames[key].styleName ?? key));
|
||||
drop.setValue(selectedstyleName);
|
||||
drop.onChange(value => selectedstyleName = value);
|
||||
});
|
||||
|
|
@ -335,7 +335,7 @@ export class NewPolylineModal extends Modal {
|
|||
new Setting(contentEl)
|
||||
.setName("Style")
|
||||
.addDropdown(drop => {
|
||||
Object.keys(this.styleNames).forEach(key => drop.addOption(key, this.styleNames[key].styleName ?? key));
|
||||
Object.keys(this.styleNames).forEach(key => void drop.addOption(key, this.styleNames[key].styleName ?? key));
|
||||
drop.setValue(selectedstyleName);
|
||||
drop.onChange(value => selectedstyleName = value);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export class MOCBlockSettingTab extends PluginSettingTab {
|
|||
.setName("Data folder")
|
||||
.setDesc("Folder in your vault where marker data files will be stored.")
|
||||
.addText(text => {
|
||||
text.setPlaceholder("e.g. mocdata");
|
||||
text.setPlaceholder("E.g. mocdata");
|
||||
text.setValue(this.plugin.settings.dataFolder || "mocdata");
|
||||
|
||||
// Track value but don't save yet: annoying workaround to prevent save on every keystroke.
|
||||
|
|
@ -79,7 +79,7 @@ export class MOCBlockSettingTab extends PluginSettingTab {
|
|||
// ---------------------------------
|
||||
|
||||
// containerEl.createEl("h2", { text: "Style settings" });
|
||||
new Setting(containerEl).setName('Marker & Polyline Styles').setHeading();
|
||||
new Setting(containerEl).setName('Marker & polyline styles').setHeading();
|
||||
|
||||
// Toggle for opaque pins
|
||||
new Setting(containerEl)
|
||||
|
|
@ -130,7 +130,7 @@ export class MOCBlockSettingTab extends PluginSettingTab {
|
|||
new Setting(detailsDiv)
|
||||
.setName("Icon")
|
||||
.addDropdown(drop => {
|
||||
AVAILABLE_ICONS.forEach(iconName => drop.addOption(iconName, iconName));
|
||||
AVAILABLE_ICONS.forEach(iconName => void drop.addOption(iconName, iconName));
|
||||
drop.setValue(config.icon);
|
||||
drop.onChange(async (value) => {
|
||||
config.icon = value;
|
||||
|
|
@ -216,13 +216,13 @@ export class MOCBlockSettingTab extends PluginSettingTab {
|
|||
|
||||
// Style input
|
||||
addSetting.addText(text => {
|
||||
text.setPlaceholder("e.g. style1");
|
||||
text.setPlaceholder("E.g. style1");
|
||||
text.onChange(value => { styleValue = value; });
|
||||
});
|
||||
|
||||
// Icon input
|
||||
addSetting.addDropdown(drop => {
|
||||
AVAILABLE_ICONS.forEach(iconName => drop.addOption(iconName, iconName));
|
||||
AVAILABLE_ICONS.forEach(iconName => void drop.addOption(iconName, iconName));
|
||||
drop.setValue(iconValue);
|
||||
drop.onChange(value => { iconValue = value; });
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue