Note: Still in development
Set of ESLint rules to lint source code that uses the angular framework.
Lint to enforce the dependency injection notation, return values for a service, provider, and factory along with some other useful features.
-
angular-di-notation: Validates that all angular dependency injection notations are initialized the same- args
- [0] on/off {number*}: Tells ESLint if this rule is on or off
- [1] notation {string="arr"}: Specifies the dependency injection notations to be arrays ("arr") or functions ("fn")
- [2] sameID {boolean=true}: When using array notation this option specifies if the function parameters should be the same name as their dependency notation (Only applicable to notation="arr")
- [3] ignoreEmpty {boolean=true}: Specifies if the dependency injection notation can be a function if it's not requiring any dependencies (Only applicable to notation="arr")
- N/A [4] inline {boolean=true}: Specifies if the dependency injection notation should be inline or defined through a variable (Only applicable to notation="arr")
- args
-
N/A
angular-directive: Validates that all angular directives are a certain type (declared similarly)- args
- [0] on/off {number*}: Tells ESLint if this rule is on or off
- [1] type {string="object"}: Which type should the directive return
- args
-
N/A
angular-service: Validates that all angular services are a certain type- args
- [0] on/off {number*}: Tells ESLint if this rule is on or off
- [1] type {string="object"}: Which type should the service return
- args
-
N/A
angular-provider:: Validates that all angular providers are a certain type- args
- [0] on/off {number*}: Tells ESLint if this rule is on or off
- [1] type {string="object"}: Which type should the provider return
- args
-
N/A
angular-factory: Validates that all angular factories are a certain type- args
- [0] on/off {number*}: Tells ESLint if this rule is on or off
- [1] type {string="object"}: Which type should the factory return
- args
-
N/A
angular-constant: Validates that all angular constants are a certain type- args
- [0] on/off {number*}: Tells ESLint if this rule is on or off
- [1] type {string="object"}: Which type should the constant return
- args
-
N/A
angular-value: Validates that all angular values are a certain type- args
- [0] on/off {number*}: Tells ESLint if this rule is on or off
- [1] type {string="object"}: Which type should the value return
- args
$ npm install angular-lint
$ N/A bower install angular-lint- Update tests
- Unify valid and invalid tests (be more coherent)
- Implement N/A rules
- Add 'inline' rule argument to 'angular-di-notation'



