Skip to content
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

Rule typecheck-object is wrongly failed for simple comparing with 'object' #509

Open
Valdermeyder opened this issue Sep 1, 2017 · 0 comments

Comments

@Valdermeyder
Copy link

Rule typecheck-object is wrongly failed for simple comparing with 'object' string

var variable = 'object';
return variable === 'object'

Same issue with other typecheck-* rules

I have opened the same issue some time ago but looks like it was wrongly interpreted.
As for me, tests added in commit shouldn't show errors.
I think it is no sense to show error when typeof is not used before the variable name. In the project where I work, we have our own business "types" which are described by some object's property. And because of this rule we need put /eslint angular/typecheck-object: 0/ in a lot of places
Or at least there should be an option to disable such restrict check of type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants