Skip to content

Conversation

Copy link

Copilot AI commented Jan 19, 2026

Addressed code review feedback on commit 8533ab7 identifying unused code duplication and unnecessary test parameters.

Changes

  • Removed unused collectNamedExports function: Duplicated logic from resolveCssModules, never called
  • Cleaned up pitch loader test calls: Created type-safe callPitch helper to omit unused previousRequest and data parameters

The pitch function signature requires three parameters per webpack's PitchLoaderDefinitionFunction interface, but the implementation only uses remainingRequest. Tests now use a helper that maintains type safety while omitting the unused parameters:

// Before: passing unused parameters
const result = await pitch.call(
  ctx as LoaderContext<KnightedCssBridgeLoaderOptions>,
  './styles.module.css?knighted-css',
  '',  // previousRequest - unused
  {},  // data - unused
)

// After: type-safe helper omits unused parameters
const result = await callPitch(
  ctx as LoaderContext<KnightedCssBridgeLoaderOptions>,
  './styles.module.css?knighted-css',
)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 19, 2026 19:18
Co-authored-by: knightedcodemonkey <139886941+knightedcodemonkey@users.noreply.github.com>
Co-authored-by: knightedcodemonkey <139886941+knightedcodemonkey@users.noreply.github.com>
Co-authored-by: knightedcodemonkey <139886941+knightedcodemonkey@users.noreply.github.com>
Co-authored-by: knightedcodemonkey <139886941+knightedcodemonkey@users.noreply.github.com>
Copilot AI changed the title [WIP] Add loader bridge for CSS module hashed class names refactor: remove unused code and superfluous test arguments in loader bridge Jan 19, 2026
Base automatically changed from bananas to main January 19, 2026 22:26
@knightedcodemonkey
Copy link
Owner

closing in favor of #64

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.

2 participants