eslint-plugin-angular
eslint-plugin-angular copied to clipboard
Disallow use of angular functions
There are rules which enforce the use of AngularJS functions.
Good
angular.isUndefined(foo);
Bad
foo === undefined;
I think these should all have an opposite variant as well:
Config
rules:
angular/definedundefined:
- 2
- never
Good
foo === undefined;
Bad
angular.isUndefined(foo);
I figured the value of this extra property can be always or never, because this matches a lot of builtin ESLint rules.
- [ ] definedundefined
- [ ] typecheck-array
- [ ] typecheck-date
- [ ] typecheck-function
- [ ] typecheck-number
- [ ] typecheck-object
- [ ] typecheck-regexp
- [ ] typecheck-string
Anyone working on this? I could use this feature so I'm willing to take it :)