From 1ac8ea6b7e78d5f3b24fdfd94f0c5e2769caa9b5 Mon Sep 17 00:00:00 2001 From: Totto16 Date: Wed, 17 Apr 2024 15:59:09 +0200 Subject: [PATCH] - add prettier ignore - format unformatted files - add scripts to work with prettier --- .prettierignore | 3 +++ .prettierrc.js | 14 +++++++------- .vscode/settings.json | 2 +- package.json | 4 +++- resources/metadata.json | 5 +---- 5 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..fe69ae38 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +.github/ +node_modules/ +*.md diff --git a/.prettierrc.js b/.prettierrc.js index 611eecc2..13c2be1a 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,7 +1,7 @@ -module.exports = { - semi: true, - trailingComma: 'all', - singleQuote: true, - printWidth: 120, - tabWidth: 2, -}; \ No newline at end of file +module.exports = { + semi: true, + trailingComma: 'all', + singleQuote: true, + printWidth: 120, + tabWidth: 2, +}; diff --git a/.vscode/settings.json b/.vscode/settings.json index e138290d..f69f98bc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -44,4 +44,4 @@ "titleBar.inactiveForeground": "#e7e7e799" }, "peacock.color": "#5b1943" -} \ No newline at end of file +} diff --git a/package.json b/package.json index cd27bd5a..fd09f8d3 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,9 @@ "test": "echo \"Error: no test specified\" && exit 1", "lint": "eslint --ext .ts src/", "shell:restart": "busctl --user call org.gnome.Shell /io/elhan/Pano io.elhan.Pano restart", - "build-and-restart": "yarn run build && yarn run shell:restart" + "build-and-restart": "yarn run build && yarn run shell:restart", + "prettier:check": "prettier --check .", + "prettier:fix": "prettier --write ." }, "commitlint": { "extends": [ diff --git a/resources/metadata.json b/resources/metadata.json index af9c2b5a..aead2f62 100644 --- a/resources/metadata.json +++ b/resources/metadata.json @@ -9,8 +9,5 @@ }, "settings-schema": "org.gnome.shell.extensions.pano", "url": "https://github.com/oae/gnome-shell-pano", - "shell-version": [ - "45", - "46" - ] + "shell-version": ["45", "46"] }