Skip to content

[feature-request] A frontend selector for TypeScript declarations, so naming rules reach .ts identifiers #452

Description

@jessegall

Proposal:
SentenceIdentifierDetector is a Backend\Detector over PhpParser, so it judges PHP identifiers only. ProseFileNameDetector bridges to TypeScript because a file NAME needs no parser, but an identifier inside a .ts module does, and the writing-detectors skill forbids regexing code structure. Vue\Codebase::whereTypeDeclaration() reaches standalone .ts type declarations, so interface and type NAMES are already judgeable — but a function, a const and a local are not, and those are most of a plain TypeScript client. A selector over .ts declarations (function, const, class, method, parameter) would let the naming sin cover the frontend with the same rule rather than a second, weaker one.

Filed via commandments feature-request from a consumer project.

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