Skip to content

Refactor: Convert snake_case variables to camelCase throughout codebase - #600

Merged
razor-x merged 1 commit into
mainfrom
claude/camelcase-eslint-removal-plan-eeznkm
Aug 4, 2026
Merged

Refactor: Convert snake_case variables to camelCase throughout codebase#600
razor-x merged 1 commit into
mainfrom
claude/camelcase-eslint-removal-plan-eeznkm

Conversation

@razor-x

@razor-x razor-x commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

This PR refactors variable naming conventions across the codebase to use camelCase instead of snake_case, improving code consistency and enabling the camelcase ESLint rule.

Key Changes

  • Variable naming: Converted all local variable declarations from snake_case to camelCase throughout the codebase
    • Examples: custom_metadatacustomMetadata, action_attemptactionAttempt, should_auto_submitshouldAutoSubmit
  • Function parameters: Updated parameter names to use camelCase
    • Examples: action_attemptactionAttempt, connect_webviewconnectWebview
  • Destructured variables: Converted destructured variable names to camelCase
    • Examples: poll_for_action_attemptpollForActionAttempt, custom_key_to_removecustomKeyToRemove
  • ESLint configuration: Removed the camelcase: 'off' rule from eslint.config.ts, enabling camelCase enforcement
  • API parameter handling: Added clarifying comment in interact-for-access-code.ts explaining that the device_id parameter key must remain snake_case to match Seam API specifications, while the local binding uses camelCase

Notable Implementation Details

  • All Seam API parameter names passed to external functions remain in snake_case (e.g., device_id, action_attempt_id) to maintain compatibility with the API
  • Local variables and internal bindings now consistently use camelCase
  • The refactoring maintains full backward compatibility with the Seam API while improving internal code readability

https://claude.ai/code/session_017BkuFhVWgKzWQYTDpz4w9Y

The `camelcase` ESLint rule was disabled for `src/bin` and `src/lib`
because local identifiers mirrored the snake_case parameter names of the
Seam API. Rename those identifiers and drop the override.

Where a name is only a local binding, it is renamed outright. Where the
name also has to leave the process, the snake_case key is kept and only
the binding is renamed:

- `seam.accessCodes.list({ device_id })`, `seam.acs.users.list({
  acs_system_id })` and `seam.actionAttempts.get({ action_attempt_id })`
  keep their request keys.
- `interactForAccessCode` keeps `device_id` as its destructuring key,
  since callers pass the blueprint params bag through as `args.params as
  any` and the cast hides a mismatch from the type checker.
- The `use_remote_api_defs` config key stays snake_case so existing
  installs keep reading their stored setting.
- `getOutput().data({ action_attempt })` keeps its output key.

The three `prompt()` answer keys are internal to a single function each,
so their `name` and binding are renamed together.

`no-console` stays off; its TODO is unrelated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017BkuFhVWgKzWQYTDpz4w9Y
@razor-x
razor-x force-pushed the claude/camelcase-eslint-removal-plan-eeznkm branch from e75109b to ded34dc Compare August 4, 2026 19:12
@razor-x
razor-x marked this pull request as ready for review August 4, 2026 19:17
@razor-x
razor-x merged commit 7d5ae40 into main Aug 4, 2026
12 checks passed
@razor-x
razor-x deleted the claude/camelcase-eslint-removal-plan-eeznkm branch August 5, 2026 05:48
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