Merge pull request #151 from adamu/main

Prefix unused variables with _
This commit is contained in:
Johannes Theiner
2025-09-17 18:12:44 +02:00
committed by GitHub

View File

@@ -17,7 +17,7 @@ export default class MyPlugin extends Plugin {
await this.loadSettings(); await this.loadSettings();
// This creates an icon in the left ribbon. // This creates an icon in the left ribbon.
const ribbonIconEl = this.addRibbonIcon('dice', 'Sample Plugin', (evt: MouseEvent) => { const ribbonIconEl = this.addRibbonIcon('dice', 'Sample Plugin', (_evt: MouseEvent) => {
// Called when the user clicks the icon. // Called when the user clicks the icon.
new Notice('This is a notice!'); new Notice('This is a notice!');
}); });
@@ -40,7 +40,7 @@ export default class MyPlugin extends Plugin {
this.addCommand({ this.addCommand({
id: 'sample-editor-command', id: 'sample-editor-command',
name: 'Sample editor command', name: 'Sample editor command',
editorCallback: (editor: Editor, view: MarkdownView) => { editorCallback: (editor: Editor, _view: MarkdownView) => {
console.log(editor.getSelection()); console.log(editor.getSelection());
editor.replaceSelection('Sample Editor Command'); editor.replaceSelection('Sample Editor Command');
} }