# identifier-case

Require canonical casing for declared identifiers

Identifier casing communicates whether a declaration introduces a type or a value.
You SHOULD use PascalCase for types, variants, extensions, and generic parameters, and camelCase for values, functions, labels, and value parameters.

Constants use the same camelCase as other values.
Newtypes MAY use camelCase when they act as decorators.
Acronyms MAY retain an established platform spelling.
Imports, string-named members, foreign declarations, protocol implementations, and generated declarations retain their imposed names.

- Category: style
- Level: warning
- Fix: none
- Scope: module

## Reported

```ds title="main.ds"
struct user_record {
    name: string;
}
```

## Accepted

```ds title="main.ds"
struct UserRecord {
    name: string;
}
```

## Prior art

- [typescript-eslint · naming-convention](https://typescript-eslint.io/rules/naming-convention)

[language/linter/src/rules/style/identifier_case.rs:8](https://github.com/destack-sh/destack/blob/main/language/linter/src/rules/style/identifier_case.rs#L8)
