Skip to content

Commit ff778d4

Browse files
author
PreskoIsTheGreatest
committed
update input and output directive properties failure string; fix attribute rule test
1 parent bce7bbe commit ff778d4

5 files changed

+5
-5
lines changed

src/inputPropertyDirectiveRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as ts from 'typescript';
33
import {ClassParameterRule} from "./propertyClassBase";
44
import {decoratorValidator} from './util/decoratorValidator';
55

6-
const FAILURE_STRING = 'In the class "%s", the directive input property "%s" cannot be renamed.' +
6+
const FAILURE_STRING = 'In the class "%s", the directive input property "%s" should not be renamed.' +
77
'Please, consider the following use "@Input() %s: string"';
88

99
const renameInputCondition = (name, arg)=> {

src/outputPropertyDirectiveRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as ts from 'typescript';
33
import {ClassParameterRule} from "./propertyClassBase";
44
import {decoratorValidator} from './util/decoratorValidator';
55

6-
const FAILURE_STRING = 'In the class "%s", the directive output property "%s" cannot be renamed.' +
6+
const FAILURE_STRING = 'In the class "%s", the directive output property "%s" should not be renamed.' +
77
'Please, consider the following use "@Output() %s = new EventEmitter();"';
88

99
const renameOutputCondition = (name, arg)=> {

test/attributeParameterDecoratorRule.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('attribute-parameter-decorator', () => {
1010
this.label = label;
1111
}
1212
}`;
13-
assertFailure('decorator-attribute', source, {
13+
assertFailure('attribute-parameter-decorator', source, {
1414
message: 'In the constructor of class "ButtonComponent", the parameter "label" uses the @Attribute decorator, ' +
1515
'which is considered as a bad practice. Please, consider construction of type "@Input() label: string"',
1616
startPosition: {

test/inputPropertyDirectiveRule.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('input-property-directive', () => {
88
@Input('labelAttribute') label: string;
99
}`;
1010
assertFailure('input-property-directive', source, {
11-
message: 'In the class "ButtonComponent", the directive input property "label" cannot be renamed.' +
11+
message: 'In the class "ButtonComponent", the directive input property "label" should not be renamed.' +
1212
'Please, consider the following use "@Input() label: string"',
1313
startPosition: {
1414
line: 2,

test/outputPropertyDirectiveRule.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('output-property-directive', () => {
88
@Output('changeEvent') change = new EventEmitter<any>();
99
}`;
1010
assertFailure('output-property-directive', source, {
11-
message: 'In the class "ButtonComponent", the directive output property "change" cannot be renamed.'+
11+
message: 'In the class "ButtonComponent", the directive output property "change" should not be renamed.'+
1212
'Please, consider the following use "@Output() change = new EventEmitter();"',
1313
startPosition: {
1414
line: 2,

0 commit comments

Comments
 (0)