summaryrefslogtreecommitdiffhomepage
path: root/main.ts
diff options
context:
space:
mode:
authorTfTHacker <[email protected]>2021-10-30 20:04:07 +0200
committerGitHub <[email protected]>2021-10-30 14:04:07 -0400
commit6fdd374cb8e46505dcef70ff249b48b16c4a659b (patch)
tree1217bc92cd16b825870df75fc47d29ac13b51870 /main.ts
parent02ac033b15fd158638ecc650cdbd0cea6b94d77a (diff)
downloadai-pulse-obsidian-plugin-6fdd374cb8e46505dcef70ff249b48b16c4a659b.tar.gz
ai-pulse-obsidian-plugin-6fdd374cb8e46505dcef70ff249b48b16c4a659b.zip
Adding eslint for code .\src\ (#17)
Diffstat (limited to 'main.ts')
-rw-r--r--main.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/main.ts b/main.ts
index f1705a3..b942689 100644
--- a/main.ts
+++ b/main.ts
@@ -15,7 +15,7 @@ export default class MyPlugin extends Plugin {
await this.loadSettings();
// This creates an icon in the left ribbon.
- let ribbonIconEl = this.addRibbonIcon('dice', 'Sample Plugin', (evt: MouseEvent) => {
+ const ribbonIconEl = this.addRibbonIcon('dice', 'Sample Plugin', (evt: MouseEvent) => {
// Called when the user clicks the icon.
new Notice('This is a notice!');
});
@@ -23,7 +23,7 @@ export default class MyPlugin extends Plugin {
ribbonIconEl.addClass('my-plugin-ribbon-class');
// This adds a status bar item to the bottom of the app. Does not work on mobile apps.
- let statusBarItemEl = this.addStatusBarItem();
+ const statusBarItemEl = this.addStatusBarItem();
statusBarItemEl.setText('Status Bar Text');
// This adds a simple command that can be triggered anywhere
@@ -49,7 +49,7 @@ export default class MyPlugin extends Plugin {
name: 'Open sample modal (complex)',
checkCallback: (checking: boolean) => {
// Conditions to check
- let markdownView = this.app.workspace.getActiveViewOfType(MarkdownView);
+ const markdownView = this.app.workspace.getActiveViewOfType(MarkdownView);
if (markdownView) {
// If checking is true, we're simply "checking" if the command can be run.
// If checking is false, then we want to actually perform the operation.
@@ -95,12 +95,12 @@ class SampleModal extends Modal {
}
onOpen() {
- let {contentEl} = this;
+ const {contentEl} = this;
contentEl.setText('Woah!');
}
onClose() {
- let {contentEl} = this;
+ const {contentEl} = this;
contentEl.empty();
}
}
@@ -114,7 +114,7 @@ class SampleSettingTab extends PluginSettingTab {
}
display(): void {
- let {containerEl} = this;
+ const {containerEl} = this;
containerEl.empty();