Skip to content

refactor: resolve eslint warnings (max-statements, complexity) - src/lib/controller/index.ts #3434

refactor: resolve eslint warnings (max-statements, complexity) - src/lib/controller/index.ts

refactor: resolve eslint warnings (max-statements, complexity) - src/lib/controller/index.ts #3434

# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on:
pull_request:
merge_group:
paths-ignore:
- "LICENSE"
- "CODEOWNERS"
- "**.md"
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Dependency Review'
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
circular-dependencies:
runs-on: ubuntu-latest
steps:
- name: setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20
cache-dependency-path: pepr
- name: 'Checkout Repository'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Circular Dependency Check
run: |
npx madge --circular --ts-config tsconfig.json --extensions ts,js src/ > tmp.log || true # Force exit 0 for post-processing
tail -n +4 tmp.log > circular-deps.log
if [ $(wc -l < circular-deps.log) -gt 11 ]; then
echo "circular-deps.log has more than 11 circular dependencies."
wc -l circular-deps.log
exit 1
else
echo "circular-deps.log has 11 or fewer circular dependencies."
exit 0
fi