Skip to content

to master#213

Merged
JoshuaVSherman merged 6 commits into
masterfrom
dev
May 19, 2026
Merged

to master#213
JoshuaVSherman merged 6 commits into
masterfrom
dev

Conversation

@JoshuaVSherman
Copy link
Copy Markdown
Contributor

No description provided.

JoshuaVSherman and others added 6 commits May 18, 2026 16:38
Adds eslint-plugin-sonarjs@^4 to the flat config and fixes/scopes all
findings reported on the dev branch.

## Sonarjs findings addressed (6 errors → 0)

- sonarjs/no-unenclosed-multiline-block (1, src/AgController/index.ts:99):
  Real readability bug — `} else break;` followed by an `if` on the next
  line looked ambiguous. Added braces around `else { break; }` and moved
  the istanbul-ignore comment to its own line.

- sonarjs/pseudo-random (1, src/AgController/index.ts:58): disabled with
  inline justification — this is a non-security pulse heartbeat (an
  arbitrary 0-4 number transmitted to clients every second), Math.random
  is fine here.

- sonarjs/no-nested-functions (4, test/**): disabled for test files via a
  files: ['test/**/*.ts'] override block. The findings are all in mock
  factories with deeply-nested arrow chains (e.g. socketcluster's
  receiver→createConsumer→next→Promise.resolve pattern); refactoring
  these into named helpers hurts readability instead of improving it.
  Rule stays active for src/.

## Stale eslint-disable comments cleaned (eslint --fix)

The sonarjs recommended config surfaced ~35 pre-existing
`// eslint-disable-line` comments for rules that aren't active anymore
(no-await-in-loop, no-constant-condition, no-console, etc.). `eslint --fix`
removed them automatically across src/AgController/, src/app/, and
src/model/.

## What's NOT addressed

86 pre-existing `@typescript-eslint/no-explicit-any` warnings remain.
These predate this PR and are out of scope; the `no-explicit-any` rule
is already set to `warn` in the config (not `error`), so they don't fail
the build. Tackle separately if desired.

Verified: 66/66 tests pass; 0 ESLint errors.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat(eslint): integrate eslint-plugin-sonarjs (closes #207)
Bumps [ws](https://github.com/websockets/ws) from 8.20.0 to 8.20.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@8.20.0...8.20.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-version: 8.20.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.5 to 5.0.6.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@v5.0.5...v5.0.6)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 5.0.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…-expansion-5.0.6

Bump brace-expansion from 5.0.5 to 5.0.6
@JoshuaVSherman JoshuaVSherman merged commit eb6cc8a into master May 19, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant