Skip to content

Class constants naming #47

Open
Open
@socram8888

Description

Currently, the ESlint configuration will mark constant properties on classes as errors. For example:

class FNV {
    private static readonly PRIME = 16777619;
    private static readonly OFFSET = 2166136261;

    // ...
}

Will be considered an error, as they are expected to follow the camel case convention used for other mutable or instance-specific values, despite being an immutable constant.

Unless this is intentional, maybe it could make sense to add a rule to force attributes tagged with static readonly to follow the same UPPER_CASE format as the rest of the constants.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions