start-elements-lowercase
Rule Details
According to our naming conventions, to easily distinguish entity names from element names we recommend starting elements with a lowercase letter, which this rule ensures.
Examples
✅ Correct example
In the following example, the rule is satisfied because the element name title starts with a lowercase letter:
cds
namespace sap.capire.bookshop;
entity Books {
key ID : Integer;
@mandatory title : localized String(111);
}1
2
3
4
5
6
2
3
4
5
6
❌ Incorrect example
This example shows the rule reporting a warning because the element name Title starts with an uppercase letter:
ts
namespace sap.capire.bookshop;
entity Books {
key ID : Integer;
// Element name 'sap.capire.bookshop.Books.Title' should start
// with a lowercase letter.
@mandatory Title : localized String(111);
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Version
This rule was introduced in @sap/eslint-plugin-cds 1.0.4.