-
Notifications
You must be signed in to change notification settings - Fork 235
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
no-output-on-prefix incorrectly throws error if output property name starts with "one" #480
Comments
no-output-on-prefix
incorrectly throws error if property starts with "one"no-output-on-prefix
incorrectly throws error if output property name starts with "one"
no-output-on-prefix
incorrectly throws error if output property name starts with "one"
Good catch. Will add a fix in the next release. |
I'm currently getting this but with "on" |
@tatsujb I'm not sure I understand you correctly but if you're getting an error with an output named something like "onClick", then that's the point of the rule: it should be just "click". |
ok that's dumb. why can't it be "on" when that would allow you to match Angular's naming convention? like the function I'm trying to hit is the original one, the one you call "click", no prefix. so I can't call the emitter "click" again, vars and functions may only be declared once in JS. so naturally "onClick" springs up to your mind as the natural name which would allow your own function to follow many if not all of Angular's functions' naming convention. |
It doesn't: https://angular.io/guide/styleguide#dont-prefix-output-properties
|
If you want to use the |
Oh. my bad. so they bridge the "name-gap" html-side : yeah that makes more sense, sorry. |
I get the same warning like you, an easy way to fix this is to not use camelCase try to use something like this. you can set a rule of course http://codelyzer.com/rules/no-output-on-prefix/ or
|
I enabled the new
no-output-on-prefix
rule and started getting an error for an output property namedoneTimeScheduleDetailItemChange
. It seems the rule is only looking at the first two letters. It should really check the first three and see if the first two are "on" and the third is a capital letter.I'm using codelyzer 4.0.2 with Angular 5.1.3.
The text was updated successfully, but these errors were encountered: