Skip to content

Fix low-severity audit issues across codebase#5

Merged
ConsoleTVs merged 1 commit intomainfrom
chore/audit-low-severity-issues
Apr 12, 2026
Merged

Fix low-severity audit issues across codebase#5
ConsoleTVs merged 1 commit intomainfrom
chore/audit-low-severity-issues

Conversation

@ConsoleTVs
Copy link
Copy Markdown
Member

Summary

Resolves 17 low-severity issues identified during the final audit pass. These are documentation fixes, type strictness improvements, spelling corrections, and minor code quality improvements. No behavioral changes.

Type Strictness (options.ts)

  • Corrected BroadcastPayload.event from QueryEvent to `${QueryEvent}:${string}` to match actual emitted values
  • Added optional signal?: AbortSignal param to NextFunction type to match implementation
  • Removed redundant Partial<> wrapper from ConfigureFunction (all Configuration properties are already optional)
  • Added missing readonly modifiers to HydrateOptions.expiration and MutateOptions.expiration

Documentation Fixes (query.ts, options.ts)

  • Fixed wrong JSDoc on keys() (said "Determines if the given key is currently resolving")
  • Fixed HydrateOptions JSDoc (copy-paste said "The mutate function options")
  • Fixed Query.forget JSDoc (incorrectly claimed it removes from both caches)
  • Fixed emit JSDoc typo: "with case" → "with care"
  • Fixed defaultFetcher JSDoc: "Stores" → "Creates"
  • Fixed comment typo: "sale item" → "stale item"
  • Fixed 8 spelling errors: immediatly (3x), responsability (1x), controll (1x), dont (1x)

Code Quality

  • Fixed QueryPrefetchTags leaking query prop onto <link> HTML elements via rest spread
  • Removed unnecessary as Error type casts in trigger() error handling
  • Added readonly to all QueryTransitionProps interface properties for consistency

Test Quality (query.test.ts, 4 React test files)

  • Fixed duplicate expect(event).toBeDefined() assertion — second one now checks expect(event.detail).toBe('works')
  • Replaced 4 inert eslint-disable-next-line comments with oxlint-disable-next-line (project uses OxLint)

Configuration (tsconfig.base.json)

  • Removed redundant skipDefaultLibCheck (already covered by skipLibCheck: true)

- Correct BroadcastPayload.event type to template literal matching actual emitted values
- Fix misleading JSDoc on keys(), HydrateOptions, Query.forget, defaultFetcher, and emit()
- Fix spelling errors: immediatly, responsability, controll, dont, sale
- Add missing readonly modifiers to QueryTransitionProps, HydrateOptions, MutateOptions
- Align NextFunction type signature with implementation (add optional signal param)
- Remove redundant Partial wrapper from ConfigureFunction type
- Fix QueryPrefetchTags leaking query prop onto <link> elements
- Fix duplicate/tautological assertion in once events test
- Replace inert eslint-disable-next-line with oxlint-disable-next-line in 4 test files
- Remove unnecessary 'as Error' casts in trigger error handling
- Remove redundant skipDefaultLibCheck from tsconfig.base.json
@ConsoleTVs ConsoleTVs marked this pull request as ready for review April 12, 2026 14:59
@ConsoleTVs ConsoleTVs merged commit cb030e3 into main Apr 12, 2026
6 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