From 597096d780096a89d1f0206be04deff8efd0f8c4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 04:13:39 +0000 Subject: [PATCH 1/2] chore(deps): update dependency @antfu/eslint-config to v3.14.0 --- yarn.lock | 73 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 24 deletions(-) diff --git a/yarn.lock b/yarn.lock index c13dcfd..2acb7fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -151,23 +151,23 @@ "@algolia/client-common" "5.12.0" "@antfu/eslint-config@^3.0.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@antfu/eslint-config/-/eslint-config-3.13.0.tgz#96cb33758cc9c0db687466888996732951d8f3cb" - integrity sha512-QO2B+w9JAfMRaXOquD7mMIggqrcdZHeRsTzxgvTYkq6YeTPfQHMQNG7wVKZh5+w0Z5c8JgTOVtf1eo5+fSYFmA== + version "3.14.0" + resolved "https://registry.yarnpkg.com/@antfu/eslint-config/-/eslint-config-3.14.0.tgz#782c191808466547900828eb8b12453721c9007c" + integrity sha512-SBQOFrF/d2aqsVhxcHZ6g5DAoUaNyaV3Vd+lGNJx4CfSuwk9EuC8sRUF819GkNdCMbH5wNdFoJ4+Tsd9sr/NBw== dependencies: "@antfu/install-pkg" "^1.0.0" "@clack/prompts" "^0.9.1" "@eslint-community/eslint-plugin-eslint-comments" "^4.4.1" "@eslint/markdown" "^6.2.1" - "@stylistic/eslint-plugin" "^2.12.1" + "@stylistic/eslint-plugin" "^2.13.0" "@typescript-eslint/eslint-plugin" "^8.19.1" "@typescript-eslint/parser" "^8.19.1" - "@vitest/eslint-plugin" "^1.1.24" + "@vitest/eslint-plugin" "^1.1.25" eslint-config-flat-gitignore "^1.0.0" eslint-flat-config-utils "^1.0.0" eslint-merge-processors "^1.0.0" eslint-plugin-antfu "^2.7.0" - eslint-plugin-command "^2.0.7" + eslint-plugin-command "^2.1.0" eslint-plugin-import-x "^4.6.1" eslint-plugin-jsdoc "^50.6.1" eslint-plugin-jsonc "^2.18.2" @@ -697,9 +697,9 @@ integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== "@eslint/compat@^1.2.4": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@eslint/compat/-/compat-1.2.4.tgz#b69b0d76ce73fe66d7f8633c406acea151f5c559" - integrity sha512-S8ZdQj/N69YAtuqFt7653jwcvuUj131+6qGLUyDqfDg1OIoBQ66OCuXC473YQfO2AaxITTutiRQiDwoo7ZLYyg== + version "1.2.5" + resolved "https://registry.yarnpkg.com/@eslint/compat/-/compat-1.2.5.tgz#438f8bbe105341853469b2cf2d10b6321cadeb3a" + integrity sha512-5iuG/StT+7OfvhoBHPlmxkPA9om6aDUFgmD4+mWKAGsYt4vCe8rypneG03AuseyRHBmcCLXQtIH5S26tIoggLg== "@eslint/config-array@^0.19.0": version "0.19.1" @@ -710,6 +710,13 @@ debug "^4.3.1" minimatch "^3.1.2" +"@eslint/core@^0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.10.0.tgz#23727063c21b335f752dbb3a16450f6f9cbc9091" + integrity sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw== + dependencies: + "@types/json-schema" "^7.0.15" + "@eslint/core@^0.9.0": version "0.9.1" resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.1.tgz#31763847308ef6b7084a4505573ac9402c51f9d1" @@ -772,7 +779,15 @@ resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.5.tgz#8670a8f6258a2be5b2c620ff314a1d984c23eb2e" integrity sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ== -"@eslint/plugin-kit@^0.2.0", "@eslint/plugin-kit@^0.2.3": +"@eslint/plugin-kit@^0.2.0": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz#ee07372035539e7847ef834e3f5e7b79f09e3a81" + integrity sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A== + dependencies: + "@eslint/core" "^0.10.0" + levn "^0.4.1" + +"@eslint/plugin-kit@^0.2.3": version "0.2.4" resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz#2b78e7bb3755784bb13faa8932a1d994d6537792" integrity sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg== @@ -1266,10 +1281,10 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz#abb11d99aeb6d27f1b563c38147a72d50058e339" integrity sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ== -"@stylistic/eslint-plugin@^2.12.1": - version "2.12.1" - resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin/-/eslint-plugin-2.12.1.tgz#e341beb4e4315084d8be20bceeeda7d8a46f079f" - integrity sha512-fubZKIHSPuo07FgRTn6S4Nl0uXPRPYVNpyZzIDGfp7Fny6JjNus6kReLD7NI380JXi4HtUTSOZ34LBuNPO1XLQ== +"@stylistic/eslint-plugin@^2.13.0": + version "2.13.0" + resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin/-/eslint-plugin-2.13.0.tgz#53bf175dac8c1ec055b370a6ff77d491cae9a70d" + integrity sha512-RnO1SaiCFHn666wNz2QfZEFxvmiNRqhzaMXHXxXXKt+MEP7aajlPxUSMIQpKAaJfverpovEYqjBOXDq6dDcaOQ== dependencies: "@typescript-eslint/utils" "^8.13.0" eslint-visitor-keys "^4.2.0" @@ -1535,10 +1550,10 @@ resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-5.2.1.tgz#d1491f678ee3af899f7ae57d9c21dc52a65c7133" integrity sha512-cxh314tzaWwOLqVes2gnnCtvBDcM1UMdn+iFR+UjAn411dPT3tOmqrJjbMd7koZpMAmBM/GqeV4n9ge7JSiJJQ== -"@vitest/eslint-plugin@^1.1.24": - version "1.1.24" - resolved "https://registry.yarnpkg.com/@vitest/eslint-plugin/-/eslint-plugin-1.1.24.tgz#4807bfa0a3af8ffb97fb11ba2754f9a5056fd02a" - integrity sha512-7IaENe4NNy33g0iuuy5bHY69JYYRjpv4lMx6H5Wp30W7ez2baLHwxsXF5TM4wa8JDYZt8ut99Ytoj7GiDO01hw== +"@vitest/eslint-plugin@^1.1.25": + version "1.1.25" + resolved "https://registry.yarnpkg.com/@vitest/eslint-plugin/-/eslint-plugin-1.1.25.tgz#0e2ed719844b52edc88a0467f11f80162ebbebf0" + integrity sha512-u8DpDnMbPcqBmJOB4PeEtn6q7vKmLVTLFMpzoxSAo0hjYdl4iYSHRleqwPQo0ywc7UV0S6RKIahYRQ3BnZdMVw== "@vitest/expect@2.1.8": version "2.1.8" @@ -2231,9 +2246,9 @@ doctrine@^3.0.0: esutils "^2.0.2" electron-to-chromium@^1.5.73: - version "1.5.79" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.79.tgz#4424f23f319db7a653cf9ee76102e4ac283e6b3e" - integrity sha512-nYOxJNxQ9Om4EC88BE4pPoNI8xwSFf8pU/BAeOl4Hh/b/i6V4biTAzwV7pXi3ARKeoYO5JZKMIXTryXSVer5RA== + version "1.5.80" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.80.tgz#ca7a8361d7305f0ec9e203ce4e633cbb8a8ef1b1" + integrity sha512-LTrKpW0AqIuHwmlVNV+cjFYTnXtM9K37OGhpe0ZI10ScPSxqVSryZHIY3WnCS5NSYbBODRTZyhRMS2h5FAEqAw== emoji-regex@^8.0.0: version "8.0.0" @@ -2437,7 +2452,7 @@ eslint-plugin-antfu@^2.7.0: dependencies: "@antfu/utils" "^0.7.10" -eslint-plugin-command@^2.0.7: +eslint-plugin-command@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-command/-/eslint-plugin-command-2.1.0.tgz#4da1b745840605878075e247cffdb2c4c82e345d" integrity sha512-S3gvDSCRHLdRG7NYaevLvGA0g/txOju7NEB2di7SE80NtbCwsvpi/fft045YuTZpOzqCRUfuye39raldmpXXYQ== @@ -3887,7 +3902,7 @@ mlly@^1.6.1: pkg-types "^1.1.1" ufo "^1.5.3" -mlly@^1.7.2, mlly@^1.7.3: +mlly@^1.7.2: version "1.7.3" resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.3.tgz#d86c0fcd8ad8e16395eb764a5f4b831590cee48c" integrity sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A== @@ -3897,6 +3912,16 @@ mlly@^1.7.2, mlly@^1.7.3: pkg-types "^1.2.1" ufo "^1.5.4" +mlly@^1.7.3: + version "1.7.4" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.4.tgz#3d7295ea2358ec7a271eaa5d000a0f84febe100f" + integrity sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw== + dependencies: + acorn "^8.14.0" + pathe "^2.0.1" + pkg-types "^1.3.0" + ufo "^1.5.4" + ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" @@ -4101,7 +4126,7 @@ pathe@^1.1.2: resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== -pathe@^2.0.0: +pathe@^2.0.0, pathe@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/pathe/-/pathe-2.0.1.tgz#ee1e6965c5ccfc98dc5a4b366a6ba6dd624a33d6" integrity sha512-6jpjMpOth5S9ITVu5clZ7NOgHNsv5vRQdheL9ztp2vZmM6fRbLvyua1tiBIL4lk8SAe3ARzeXEly6siXCjDHDw== From 86e24d9e8f568e3bd71b9991c97d01941bbda1e4 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 04:14:24 +0000 Subject: [PATCH 2/2] [autofix.ci] apply automated fixes --- src/rules/rrd/cyclomaticComplexity.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rules/rrd/cyclomaticComplexity.ts b/src/rules/rrd/cyclomaticComplexity.ts index fd67ccc..fb621c9 100644 --- a/src/rules/rrd/cyclomaticComplexity.ts +++ b/src/rules/rrd/cyclomaticComplexity.ts @@ -29,10 +29,10 @@ const checkCyclomaticComplexity = (script: SFCScriptBlock | null, filePath: stri const cyclomaticComplexity = (_ifCount?.length || 0) - + (_elseCount?.length || 0) - + (_forCount?.length || 0) - + (_whileCount?.length || 0) - + (_caseCount?.length || 0) + + (_elseCount?.length || 0) + + (_forCount?.length || 0) + + (_whileCount?.length || 0) + + (_caseCount?.length || 0) if (cyclomaticComplexity > complexityModerate) { results.push({ filePath, message: `Cyclomatic complexity is ${cyclomaticComplexity > COMPLEXITY_HIGH ? `very high` : `high`} (${cyclomaticComplexity})${cyclomaticComplexity > COMPLEXITY_HIGH ? `` : ``}` })