chore: adjust prettier config, .gitignore and use taplo to format toml files (#1728)

* chore: adjust prettier config, .gitignore and use taplo to format toml files

This brings the plugins-workspace repository to the same code style of the main tauri repo

* format toml

* ignore examples gen dir

* add .vscode/extensions.json

* remove packageManager field

* fmt

* fix audit

* taplo ignore permissions autogenerated files

* remove create dummy dist

* fix prettier workflow

* install fmt in prettier workflow

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
Amr Bashir
2024-09-04 14:54:23 +03:00
committed by GitHub
parent 72c2ce82c1
commit cf4d7d4e6c
227 changed files with 2534 additions and 2505 deletions
+9 -9
View File
@@ -2,8 +2,8 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
import { invoke } from "@tauri-apps/api/core";
import { type WindowLabel, getCurrentWindow } from "@tauri-apps/api/window";
import { invoke } from '@tauri-apps/api/core'
import { type WindowLabel, getCurrentWindow } from '@tauri-apps/api/window'
export enum StateFlags {
SIZE = 1 << 0,
@@ -12,14 +12,14 @@ export enum StateFlags {
VISIBLE = 1 << 3,
DECORATIONS = 1 << 4,
FULLSCREEN = 1 << 5,
ALL = SIZE | POSITION | MAXIMIZED | VISIBLE | DECORATIONS | FULLSCREEN,
ALL = SIZE | POSITION | MAXIMIZED | VISIBLE | DECORATIONS | FULLSCREEN
}
/**
* Save the state of all open windows to disk.
*/
async function saveWindowState(flags: StateFlags): Promise<void> {
await invoke("plugin:window-state|save_window_state", { flags });
await invoke('plugin:window-state|save_window_state', { flags })
}
/**
@@ -27,22 +27,22 @@ async function saveWindowState(flags: StateFlags): Promise<void> {
*/
async function restoreState(
label: WindowLabel,
flags: StateFlags,
flags: StateFlags
): Promise<void> {
await invoke("plugin:window-state|restore_state", { label, flags });
await invoke('plugin:window-state|restore_state', { label, flags })
}
/**
* Restore the state for the current window from disk.
*/
async function restoreStateCurrent(flags: StateFlags): Promise<void> {
await restoreState(getCurrentWindow().label, flags);
await restoreState(getCurrentWindow().label, flags)
}
/**
* Get the name of the file used to store window state.
*/
async function filename(): Promise<string> {
return await invoke("plugin:window-state|filename");
return await invoke('plugin:window-state|filename')
}
export { restoreState, restoreStateCurrent, saveWindowState, filename };
export { restoreState, restoreStateCurrent, saveWindowState, filename }