eslint-plugin-angular icon indicating copy to clipboard operation
eslint-plugin-angular copied to clipboard

Disallow use of angular functions

Open remcohaszing opened this issue 10 years ago • 2 comments

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.

remcohaszing avatar Nov 18 '15 21:11 remcohaszing

  • [ ] definedundefined
  • [ ] typecheck-array
  • [ ] typecheck-date
  • [ ] typecheck-function
  • [ ] typecheck-number
  • [ ] typecheck-object
  • [ ] typecheck-regexp
  • [ ] typecheck-string

EmmanuelDemey avatar Dec 11 '15 16:12 EmmanuelDemey

Anyone working on this? I could use this feature so I'm willing to take it :)

himdel avatar Apr 04 '17 10:04 himdel