In Angular, we are enforcing the use of lower-case first letter Camel case for code. For instance, if a variable is named ProductName with an uppercase first letter, it should trigger a warning or error.
Is there a way to configure TSLint to only allow camelCase and disallow PascalCase?
this.product.ProductName = 5;
No errors are currently being displayed in usage, only within the Class component itself:
export class Product {
ProductId: number;
ProductName: string;
}
TSLint Settings:
"variable-name": {
"options": [
"ban-keywords",
"check-format"
]
}
Visit this link for more information on the variable name rule in TSLint