Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/jsii/lib/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function _defaultValidations(): ValidationFunction[] {
if (member.static && (member as spec.Property).const) { continue; }
if (member.name && member.name !== Case.camel(member.name)) {
diagnostic(ts.DiagnosticCategory.Error,
`Method and property names must use camelCase: ${member.name}`);
`Method and non-static non-readonly property names must use camelCase: ${member.name}`);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii/test/negatives/neg.method-name.1.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///!MATCH_ERROR: Method and property names must use camelCase: METHOD
///!MATCH_ERROR: Method and non-static non-readonly property names must use camelCase: METHOD

export class MyClass {
public METHOD() {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii/test/negatives/neg.method-name.2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///!MATCH_ERROR: Method and property names must use camelCase: hello_world
///!MATCH_ERROR: Method and non-static non-readonly property names must use camelCase: hello_world

export class MyClass {
public hello_world() {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii/test/negatives/neg.property-name.1.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///!MATCH_ERROR: Method and property names must use camelCase: PROP
///!MATCH_ERROR: Method and non-static non-readonly property names must use camelCase: PROP

export class MyClass {
public PROP?: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii/test/negatives/neg.property-name.2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///!MATCH_ERROR: Method and property names must use camelCase: my_Prop
///!MATCH_ERROR: Method and non-static non-readonly property names must use camelCase: my_Prop

export class MyClass {
public my_Prop?: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii/test/negatives/neg.static-method-name.1.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///!MATCH_ERROR: Method and property names must use camelCase: MethodIsNotCamelCase
///!MATCH_ERROR: Method and non-static non-readonly property names must use camelCase: MethodIsNotCamelCase

export class MyClass {
MethodIsNotCamelCase() {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii/test/negatives/neg.static-method-name.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///!MATCH_ERROR: Method and property names must use camelCase: METHOD
///!MATCH_ERROR: Method and non-static non-readonly property names must use camelCase: METHOD

export class MyClass {
METHOD() {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii/test/negatives/neg.static-prop-name.1.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///!MATCH_ERROR: Method and property names must use camelCase: Prop
///!MATCH_ERROR: Method and non-static non-readonly property names must use camelCase: Prop

export class MyClass {
static get Prop() {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii/test/negatives/neg.static-prop-name.2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///!MATCH_ERROR: Method and property names must use camelCase: PROP
///!MATCH_ERROR: Method and non-static non-readonly property names must use camelCase: PROP

export class MyClass {
static get PROP() {
Expand Down