mirror of
https://github.com/kdnk/obsidian-automatic-linker.git
synced 2026-07-22 12:00:30 +00:00
chore: Swap Obsidian Linter and Prettier execution order
This commit is contained in:
parent
b6c92616c7
commit
0077b1155b
1 changed files with 7 additions and 8 deletions
15
src/main.ts
15
src/main.ts
|
|
@ -427,7 +427,13 @@ export default class AutomaticLinkerPlugin extends Plugin {
|
|||
await sleep(this.settings.formatDelayMs ?? 100);
|
||||
await this.formatOnSave();
|
||||
|
||||
// Run Obsidian Linter after formatting if enabled
|
||||
if (this.settings.runPrettierAfterFormatting) {
|
||||
await sleep(this.settings.formatDelayMs ?? 100);
|
||||
//@ts-expect-error
|
||||
await this.app?.commands?.executeCommandById(
|
||||
"prettier-format:format-file",
|
||||
);
|
||||
}
|
||||
if (this.settings.runLinterAfterFormatting) {
|
||||
await sleep(this.settings.formatDelayMs ?? 100);
|
||||
//@ts-expect-error
|
||||
|
|
@ -436,13 +442,6 @@ export default class AutomaticLinkerPlugin extends Plugin {
|
|||
);
|
||||
}
|
||||
|
||||
if (this.settings.runPrettierAfterFormatting) {
|
||||
await sleep(this.settings.formatDelayMs ?? 100);
|
||||
//@ts-expect-error
|
||||
await this.app?.commands?.executeCommandById(
|
||||
"prettier-format:format-file",
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue