-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(rule): add special case to no-input-rename rule #561
Conversation
src/noInputRenameRule.ts
Outdated
import { NgWalker } from './angular/ngWalker'; | ||
|
||
export class Rule extends Lint.Rules.AbstractRule { | ||
public static metadata: Lint.IRuleMetadata = { | ||
ruleName: 'no-input-rename', | ||
type: 'maintainability', | ||
description: 'Disallows renaming directive inputs by providing a string to the decorator.', | ||
description: 'Disallows renaming inputs by providing a string to the decorator.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not in favor of removing directive
. The sentence is ambiguous. We can change it by:
Disallows renaming directive or component inputs by providing a string to the decorator.
however, a component is a directive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rafaelss95 , have you seen this comment ?
test/noInputRenameRule.spec.ts
Outdated
describe(componentDecorator, () => { | ||
it('should fail when a input property is renamed', () => { | ||
const source = ` | ||
@${componentDecorator} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this syntax difficult to read again. Can you change this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rafaelss95 I see your point moving the names to constants. I agree with @wKoza that it'll be easier to read if we have the names inline. It's also unlikely we go back and rename the classes and/or decorators.
Have you seen my comment #561 (comment) ? Other than that, it's great ! |
I've fixed it. @wKoza |
This:
Fixes #374.