Skip to content

Commit 04179fe

Browse files
committed
🧹 code formatting
1 parent 7c8bd01 commit 04179fe

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

‎src/snippetor-CreateFoldersModal.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class CreateFolderModal extends Modal {
301301
cls: "nav-folder-title-content",
302302
text: isDefault
303303
? "Default Folder"
304-
: folderSettings.target ?? "Folder Name",
304+
: (folderSettings.target ?? "Folder Name"),
305305
});
306306
if (!folderSettings.cache) {
307307
folderSettings.cache = {

‎src/snippetor-FolderSuggestor.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ class Suggester<T> {
2828
constructor(
2929
owner: SuggestModal<T>,
3030
containerEl: HTMLElement,
31-
scope: Scope
31+
scope: Scope,
3232
) {
3333
this.containerEl = containerEl;
3434
this.owner = owner;
3535
containerEl.on(
3636
"click",
3737
".suggestion-item",
38-
this.onSuggestionClick.bind(this)
38+
this.onSuggestionClick.bind(this),
3939
);
4040
containerEl.on(
4141
"mousemove",
4242
".suggestion-item",
43-
this.onSuggestionMouseover.bind(this)
43+
this.onSuggestionMouseover.bind(this),
4444
);
4545

4646
scope.register([], "ArrowUp", () => {
@@ -158,7 +158,7 @@ export abstract class SuggestionModal<T> extends FuzzySuggestModal<T> {
158158
".suggestion-container",
159159
(event: MouseEvent) => {
160160
event.preventDefault();
161-
}
161+
},
162162
);
163163
}
164164
onInputChanged(): void {
@@ -183,7 +183,7 @@ export abstract class SuggestionModal<T> extends FuzzySuggestModal<T> {
183183
this.suggester.empty();
184184
this.renderSuggestion(
185185
null,
186-
this.contentEl.createDiv("suggestion-item")
186+
this.contentEl.createDiv("suggestion-item"),
187187
);
188188
}
189189
open(): void {

‎src/snippetor-SettingsTab.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ export class SnippetorSettingsTab extends PluginSettingTab {
6262
.addDropdown((d) => {
6363
d.addOption(
6464
DEFAULT_TASK_SNIPPET_SETTINGS.type,
65-
"Custom checkboxes"
65+
"Custom checkboxes",
6666
);
6767
d.setValue(DEFAULT_TASK_SNIPPET_SETTINGS.type);
6868

6969
d.addOption(
7070
DEFAULT_FOLDER_SNIPPET_SETTINGS.type,
71-
"Colored folders"
71+
"Colored folders",
7272
);
7373

7474
d.onChange((v) => {
@@ -81,7 +81,7 @@ export class SnippetorSettingsTab extends PluginSettingTab {
8181
.setIcon("plus-with-circle")
8282
.onClick(async () => {
8383
await this.openModal(selector.type, null);
84-
})
84+
}),
8585
);
8686
}
8787

@@ -99,7 +99,7 @@ export class SnippetorSettingsTab extends PluginSettingTab {
9999
.onClick(async () => {
100100
await this.openModal(snippet.type, snippet);
101101
this.listExistingSnippets();
102-
})
102+
}),
103103
)
104104
.addExtraButton((b: ExtraButtonComponent) =>
105105
b
@@ -112,7 +112,7 @@ export class SnippetorSettingsTab extends PluginSettingTab {
112112
new Notice(`Copied snippet '${snippet.name}'`);
113113
await this.openModal(snippet.type, copy);
114114
this.listExistingSnippets();
115-
})
115+
}),
116116
)
117117
.addExtraButton((b: ExtraButtonComponent) =>
118118
b
@@ -121,7 +121,7 @@ export class SnippetorSettingsTab extends PluginSettingTab {
121121
.onClick(async () => {
122122
await this.plugin.removeSnippet(snippet);
123123
this.listExistingSnippets();
124-
})
124+
}),
125125
);
126126
}
127127
}
@@ -148,7 +148,7 @@ export class SnippetorSettingsTab extends PluginSettingTab {
148148
const taskCfg = await openCreateCheckboxModal(
149149
this.app,
150150
snippet as TaskSnippetConfig,
151-
this.plugin.snippetor
151+
this.plugin.snippetor,
152152
);
153153
if (taskCfg) {
154154
console.debug("Snippetor: modal closed with %o", taskCfg);
@@ -159,7 +159,7 @@ export class SnippetorSettingsTab extends PluginSettingTab {
159159
const taskCfg = await openCreateFolderModal(
160160
this.app,
161161
snippet as FolderSnippetConfig,
162-
this.plugin.snippetor
162+
this.plugin.snippetor,
163163
);
164164
if (taskCfg) {
165165
console.debug("Snippetor: modal closed with %o", taskCfg);

‎src/snippetor-Snippetor.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class Snippetor {
125125
}
126126

127127
initFolderSnippetConfig(
128-
cfg: Partial<FolderSnippetConfig>
128+
cfg: Partial<FolderSnippetConfig>,
129129
): FolderSnippetConfig {
130130
this.initCommonConfig(cfg); // last, it bumps the version
131131
return cfg as FolderSnippetConfig;
@@ -243,7 +243,7 @@ export class Snippetor {
243243
}
244244
if (!snippet) {
245245
new Notice(
246-
"Unable to create snippet: Content is empty. Check console for details."
246+
"Unable to create snippet: Content is empty. Check console for details.",
247247
);
248248
return Promise.reject();
249249
}
@@ -261,10 +261,10 @@ export class Snippetor {
261261
},
262262
(reason) => {
263263
new Notice(
264-
"Snippet modification failed. Check console for details."
264+
"Snippet modification failed. Check console for details.",
265265
);
266266
console.error("Snippet modification failed: %o", reason);
267-
}
267+
},
268268
);
269269
} else {
270270
update = this.app.vault.create(path, snippet as string).then(
@@ -273,10 +273,10 @@ export class Snippetor {
273273
},
274274
(reason) => {
275275
new Notice(
276-
"Snippet creation failed. Check console for details."
276+
"Snippet creation failed. Check console for details.",
277277
);
278278
console.error("Snippet creation failed: %o", reason);
279-
}
279+
},
280280
);
281281
}
282282
return update.then(() => this.app.customCss.readSnippets()); // refresh snippets
@@ -298,10 +298,10 @@ export class Snippetor {
298298
},
299299
(reason) => {
300300
new Notice(
301-
"Snippet deletion failed. Check console for details."
301+
"Snippet deletion failed. Check console for details.",
302302
);
303303
console.error("Snippet creation failed: %o", reason);
304-
}
304+
},
305305
);
306306
}
307307

0 commit comments

Comments
 (0)