EmmanuelDemey / EmmanuelDemey/eslint-plugin-angular
Rule `typecheck-object` is wrongly failed for simple comparing with 'object'
- Dominant language
- JavaScript
- Stars
- 620
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Description
Rule `typecheck-object` is wrongly failed for simple comparing with 'object' string
```javascript
var variable = 'object';
return variable === 'object'
```
Same issue with other `typecheck-*` rules
I have opened the [same issue](https://github.com/Gillespie59/eslint-plugin-angular/issues/444) some time ago but looks like it was wrongly interpreted.
As for me, tests added in [commit](https://github.com/Gillespie59/eslint-plugin-angular/commit/092ce8cca802c817140c816b3fdccdf40908c4b2) 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.