Skip to content

Allow injected global names like __NAME__ in naming convention #4

@sethlivingston

Description

@sethlivingston

Summary

Update the naming-convention rule configuration to allow build-time injected global constants using the common __NAME__ convention.

Context

During Vitest config integration in oneway-http, build-time injected constants like these were clearer and more expressive:

  • __ONEWAY_HTTP_EXPECTED_ROOT_TARGET__
  • __ONEWAY_HTTP_TEST_PROJECT__

The current naming convention rejected them, which pushed the code toward less expressive camelCase names for what are really compile-time injected constants.

Proposal

Allow a pattern like:

  • ^__[_A-Z0-9]+__$

This should apply in the places where naming convention currently rejects these identifiers.

Acceptance criteria

  • The recommended narrows config allows __NAME__-style injected constants.
  • The rule remains strict for ordinary identifiers.
  • Documentation includes a brief rationale/examples for allowed injected-global names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions