From 4d79c15487b19ef40908d4b1f40babecd723772d Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva <valeria.fadeeva.me@gmail.com> Date: Thu, 6 Feb 2025 13:59:44 +0500 Subject: [PATCH] Update --- .trunk/.gitignore | 9 ++++++++ .trunk/configs/.markdownlint.yaml | 2 ++ .trunk/configs/.shellcheckrc | 7 ++++++ .trunk/configs/.yamllint.yaml | 7 ++++++ .trunk/configs/svgo.config.js | 14 ++++++++++++ .trunk/trunk.yaml | 38 +++++++++++++++++++++++++++++++ public/assets/js/script.js | 20 ++++++++++++++++ 7 files changed, 97 insertions(+) create mode 100644 .trunk/.gitignore create mode 100644 .trunk/configs/.markdownlint.yaml create mode 100644 .trunk/configs/.shellcheckrc create mode 100644 .trunk/configs/.yamllint.yaml create mode 100644 .trunk/configs/svgo.config.js create mode 100644 .trunk/trunk.yaml diff --git a/.trunk/.gitignore b/.trunk/.gitignore new file mode 100644 index 0000000..15966d0 --- /dev/null +++ b/.trunk/.gitignore @@ -0,0 +1,9 @@ +*out +*logs +*actions +*notifications +*tools +plugins +user_trunk.yaml +user.yaml +tmp diff --git a/.trunk/configs/.markdownlint.yaml b/.trunk/configs/.markdownlint.yaml new file mode 100644 index 0000000..b40ee9d --- /dev/null +++ b/.trunk/configs/.markdownlint.yaml @@ -0,0 +1,2 @@ +# Prettier friendly markdownlint config (all formatting rules disabled) +extends: markdownlint/style/prettier diff --git a/.trunk/configs/.shellcheckrc b/.trunk/configs/.shellcheckrc new file mode 100644 index 0000000..8c7b1ad --- /dev/null +++ b/.trunk/configs/.shellcheckrc @@ -0,0 +1,7 @@ +enable=all +source-path=SCRIPTDIR +disable=SC2154 + +# If you're having issues with shellcheck following source, disable the errors via: +# disable=SC1090 +# disable=SC1091 diff --git a/.trunk/configs/.yamllint.yaml b/.trunk/configs/.yamllint.yaml new file mode 100644 index 0000000..184e251 --- /dev/null +++ b/.trunk/configs/.yamllint.yaml @@ -0,0 +1,7 @@ +rules: + quoted-strings: + required: only-when-needed + extra-allowed: ["{|}"] + key-duplicates: {} + octal-values: + forbid-implicit-octal: true diff --git a/.trunk/configs/svgo.config.js b/.trunk/configs/svgo.config.js new file mode 100644 index 0000000..b257d13 --- /dev/null +++ b/.trunk/configs/svgo.config.js @@ -0,0 +1,14 @@ +module.exports = { + plugins: [ + { + name: "preset-default", + params: { + overrides: { + removeViewBox: false, // https://github.com/svg/svgo/issues/1128 + sortAttrs: true, + removeOffCanvasPaths: true, + }, + }, + }, + ], +}; diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml new file mode 100644 index 0000000..44eae95 --- /dev/null +++ b/.trunk/trunk.yaml @@ -0,0 +1,38 @@ +# This file controls the behavior of Trunk: https://docs.trunk.io/cli +# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml +version: 0.1 +cli: + version: 1.22.6 +# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) +plugins: + sources: + - id: trunk + ref: v1.6.7 + uri: https://github.com/trunk-io/plugins +# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) +runtimes: + enabled: + - go@1.21.0 + - node@18.20.5 + - python@3.10.8 +# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) +lint: + enabled: + - checkov@3.2.365 + - git-diff-check + - markdownlint@0.44.0 + - osv-scanner@1.9.2 + - oxipng@9.1.3 + - prettier@3.4.2 + - shellcheck@0.10.0 + - shfmt@3.6.0 + - svgo@3.3.2 + - trufflehog@3.88.4 + - yamllint@1.35.1 +actions: + disabled: + - trunk-announce + - trunk-check-pre-push + - trunk-fmt-pre-commit + enabled: + - trunk-upgrade-available diff --git a/public/assets/js/script.js b/public/assets/js/script.js index 8f04b88..efbf2c9 100644 --- a/public/assets/js/script.js +++ b/public/assets/js/script.js @@ -86,6 +86,26 @@ switch (query) { bodyFetch(query); break; + case "/help": + bodyFetch("/cooperation"); + break; + + case "/doc": + bodyFetch("/cooperation"); + break; + + case "/docs": + bodyFetch("/cooperation"); + break; + + case "/wiki": + bodyFetch("/cooperation"); + break; + + case "/issue": + bodyFetch("/cooperation"); + break; + case "/cooperation": bodyFetch(query); break;