From 2b7430921704a894e7e1c344c1124fd106d529d7 Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:11:37 +0100 Subject: [PATCH 1/2] ci(trunk): Initialise trunk --- .trunk/.gitignore | 9 +++++++++ .trunk/configs/.markdownlint.yaml | 2 ++ .trunk/configs/.yamllint.yaml | 7 +++++++ .trunk/trunk.yaml | 33 +++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 .trunk/.gitignore create mode 100644 .trunk/configs/.markdownlint.yaml create mode 100644 .trunk/configs/.yamllint.yaml 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/.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/trunk.yaml b/.trunk/trunk.yaml new file mode 100644 index 0000000..c10e6b0 --- /dev/null +++ b/.trunk/trunk.yaml @@ -0,0 +1,33 @@ +# 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.4 +# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) +plugins: + sources: + - id: trunk + ref: v1.6.2 + uri: https://github.com/trunk-io/plugins +# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) +runtimes: + enabled: + - node@18.12.1 + - python@3.10.8 +# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) +lint: + enabled: + - actionlint@1.7.1 + - checkov@3.2.243 + - git-diff-check + - markdownlint@0.41.0 + - prettier@3.3.3 + - trufflehog@3.81.10 + - yamllint@1.35.1 +actions: + enabled: + - commitlint + - trunk-announce + - trunk-check-pre-push + - trunk-fmt-pre-commit + - trunk-upgrade-available From 401b4378649f0c8f31a9f806c55ddc3cb5f754dc Mon Sep 17 00:00:00 2001 From: chris3ware <36608309+chris3ware@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:14:56 +0100 Subject: [PATCH 2/2] ci(commitlint): Format config file --- commitlint.config.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/commitlint.config.js b/commitlint.config.js index badfc8e..649cf17 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -10,13 +10,7 @@ module.exports = { "scope-enum": [ 1, "always", - [ - "commitlint", - ".github", - "pr-check", - "release", - "trunk" - ], + ["commitlint", ".github", "pr-check", "release", "trunk"], ], //"signed-off-by": [1, "always", "Signed-off-by:"], "subject-case": [1, "always", "sentence-case"],