diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index c5be135c2..1aff2ace6 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -1,7 +1,7 @@ # https://features.trunk.io/check/p/trunk-doesnt-work-in-nested-repo version: 0.1 cli: - version: 1.11.1 + version: 1.12.0 plugins: sources: - id: trunk @@ -20,18 +20,18 @@ actions: - trunk-upgrade-available lint: enabled: - - checkov@2.3.309 - - trufflehog@3.42.0 + - checkov@2.3.324 + - trufflehog@3.44.0 - actionlint@1.6.25 - - black@23.3.0 - - eslint@8.43.0 + - black@23.7.0 + - eslint@8.44.0 - flake8@6.0.0 - git-diff-check@SYSTEM - gitleaks@8.17.0 - isort@5.12.0 - markdownlint@0.35.0 - - prettier@2.8.8 - - ruff@0.0.275 + - prettier@3.0.0 + - ruff@0.0.278 - shellcheck@0.9.0 - shfmt@3.6.0 - taplo@0.7.0 diff --git a/commands/choose-option b/commands/choose-option index 5aabcfa92..8cf895589 100755 --- a/commands/choose-option +++ b/commands/choose-option @@ -220,7 +220,6 @@ function choose-option() ( # helpers local saved_results=() saved_visuals=() function save_result { - # trunk-ignore(shellcheck/SC2034) local VALUE="$1" LABEL="$2" VISUAL="$3" local result='' eval "result=\"$option_return\"" diff --git a/commands/config-edit b/commands/config-edit index 435a2e6ff..a898a5611 100755 --- a/commands/config-edit +++ b/commands/config-edit @@ -184,7 +184,7 @@ function config-edit() ( if test "${TERM_PROGRAM-}" = 'vscode'; then # https://github.com/Microsoft/vscode/issues/29523 - if [[ "$option_line" = *' '* ]]; then + if [[ $option_line == *' '* ]]; then option_line="${option_line/ / }" fi fi diff --git a/commands/echo-escape-regex b/commands/echo-escape-regex index 62e1da942..f4e0d7baa 100755 --- a/commands/echo-escape-regex +++ b/commands/echo-escape-regex @@ -34,6 +34,7 @@ function echo-escape-regex() ( for ((i = 0; i < ${#input}; i++)); do char="${input:i:1}" case "$char" in + # trunk-ignore(shellcheck/SC1001) \\ | \[ | \] | \{ | \} | \^ | \$ | \. | \* | \+ | \? | \| | \( | \)) printf '%s' "\\$char" ;; diff --git a/commands/is-empty-directory b/commands/is-empty-directory index a56899b9e..bb56b2fa8 100755 --- a/commands/is-empty-directory +++ b/commands/is-empty-directory @@ -46,7 +46,7 @@ function is-empty-directory() ( # Action # action - local path results + local path result for path in "${paths[@]}"; do if test ! -d "$path"; then return 1 diff --git a/commands/mount-helper b/commands/mount-helper index 6f176d43f..cd13a0d3b 100755 --- a/commands/mount-helper +++ b/commands/mount-helper @@ -1400,11 +1400,11 @@ function mount-helper() ( fi # process check - if [[ "$local_check_status" = *'[source-missing]'* && "$local_check_status" = *'[target-missing]'* ]]; then + if [[ $local_check_status == *'[source-missing]'* && $local_check_status == *'[target-missing]'* ]]; then echo-style --positive='Source not mounted.' --positive='Target not mounted.' # echo-style --notice="will prepare..." break - elif [[ "$local_check_status" = *'[source-found][target-found][valid]'* ]]; then # needs both as unmounting with only --target and no source information is still [valid] + elif [[ $local_check_status == *'[source-found][target-found][valid]'* ]]; then # needs both as unmounting with only --target and no source information is still [valid] echo-style --positive="Source already mounted to target." # if the goal is mounting, then check if they want to remount if test "$option_remount" = 'yes'; then @@ -1440,7 +1440,7 @@ function mount-helper() ( return "$confirm_ec" fi fi - elif [[ "$local_check_status" = *'[source-missing]'* && "$local_check_status" = *'[target-found]'* ]]; then + elif [[ $local_check_status == *'[source-missing]'* && $local_check_status == *'[target-found]'* ]]; then echo-style --positive='Source not mounted.' ' ' --negative='Target mounted to an unexpected source.' confirm_ec=0 && confirm --positive --ppid=$$ -- 'Unmount the target to mount to the correct source?' || confirm_ec="$?" if test "$confirm_ec" -eq 0; then @@ -1453,7 +1453,7 @@ function mount-helper() ( # failure return "$confirm_ec" fi - elif [[ "$local_check_status" = *'[source-found]'* && "$local_check_status" = *'[target-missing]'* ]]; then + elif [[ $local_check_status == *'[source-found]'* && $local_check_status == *'[target-missing]'* ]]; then echo-style --notice='Source mounted to another target.' ' ' --positive='Target not mounted to any source.' confirm_ec=0 && confirm --positive --ppid=$$ -- 'Prepare the target to be an additional mount for the source?' || confirm_ec="$?" if test "$confirm_ec" -eq 0; then diff --git a/package.json b/package.json index b3ab172f1..7e7fb148f 100644 --- a/package.json +++ b/package.json @@ -100,13 +100,13 @@ ], "devDependencies": { "@bevry/update-contributors": "^1.22.0", - "@typescript-eslint/eslint-plugin": "^5.59.11", - "@typescript-eslint/parser": "^5.59.11", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", "eslint-config-bevry": "^3.27.0", "eslint-config-prettier": "^8.8.0", - "eslint-plugin-prettier": "^4.2.1", - "eslint": "^8.42.0", - "prettier": "^2.8.8", + "eslint-plugin-prettier": "^5.0.0", + "eslint": "^8.44.0", + "prettier": "^3.0.0", "projectz": "^2.23.0", "valid-directory": "^3.9.0" },