Skip to content

Commit fc3cc9c

Browse files
committed
Merge pull request #183 from Gillespie59/development
0.8.1
2 parents 80ed1a0 + 73538db commit fc3cc9c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ We provide also three samples :
8585
| 'ng_directive_name': 0 | All your directives should have a name starting with the parameter you can define in your config object. The second parameter can be a Regexp wrapped in quotes. You can not prefix your directives by "ng" (reserved keyword for AngularJS directives) ("ng_directive_name": [2, "ng"]) [Y073](https://github.com/johnpapa/angular-styleguide#style-y073), [Y126](https://github.com/johnpapa/angular-styleguide#style-y126) |
8686
| 'ng_document_service': 2 | Instead of the default document object, you should prefer the AngularJS wrapper service $document. [Y180](https://github.com/johnpapa/angular-styleguide#style-y180) |
8787
| 'ng_empty_controller': 0 | If you have one empty controller, maybe you have linked it in your Router configuration or in one of your views. You can remove this declaration because this controller is useless |
88-
| 'ng_foreach': 0 | You should use the angular.forEach method instead of the default JavaScript implementation [].forEach. |
8988
| 'ng_file_name': 0 | All your file names should match the angular component name. The second parameter can be a config object [2, {nameStyle: 'dash', typeSeparator: 'dot', ignoreTypeSuffix: true}] to match `avenger-profile.directive.js` or `avanger-api.service.js`. Possible values for `typeSeparator` and `nameStyle` are `dot`, `dash` and `underscore`. The options `ignoreTypeSuffix` ignores camel cased suffixes like `someController` or `myService`. [Y120](https://github.com/johnpapa/angular-styleguide#style-y120) [Y121](https://github.com/johnpapa/angular-styleguide#style-y121) |
9089
| 'ng_filter_name': 0 | All your filters should have a name starting with the parameter you can define in your config object. The second parameter can be a Regexp wrapped in quotes. ("ng_filter_name": [2, "ng"]) |
90+
| 'ng_foreach': 0 | You should use the angular.forEach method instead of the default JavaScript implementation [].forEach. |
9191
| 'ng_function_type': 0 | Anonymous or named functions inside AngularJS components. The first parameter sets which type of function is required and can be 'named' or 'anonymous'. The second parameter is an optional list of angular object names. [Y024](https://github.com/johnpapa/angular-styleguide/blob/master/README.md#style-y024) |
9292
| 'ng_interval_service': 2 | Instead of the default setInterval function, you should use the AngularJS wrapper service $interval [Y181](https://github.com/johnpapa/angular-styleguide#style-y181) |
9393
| 'ng_json_functions': 2 | You should use angular.fromJson or angular.toJson instead of JSON.parse and JSON.stringify |
@@ -99,10 +99,10 @@ We provide also three samples :
9999
| 'ng_no_digest': 2 | DEPRECATED! The scope's $digest() method shouldn't be used. You should prefer the $apply method. |
100100
| 'ng_no_jquery_angularelement': 2 | You should not wrap angular.element object into jQuery(), because angular.element already return jQLite element|
101101
| 'ng_no_private_call': 2 | All scope's properties/methods starting with $$ are used internally by AngularJS. You should not use them directly. |
102-
| 'ng_no_services': [2, ['$http', '$resource', 'Restangular']] | Some services should be used only in a specific AngularJS service (Ajax-based service for example), in order to follow the separation of concerns paradigm. The second parameter specifies the services. The third parameter can be a list of angular objects (controller, factory, etc.). Or second parameter can be an object, where keys are angular object names and value is a list of services (like {controller: ['$http'], factory: ['$q']}) |
103102
| 'ng_no_service_method': 2 | You should prefer the factory() method instead of service() [Y040](https://github.com/johnpapa/angular-styleguide#style-y040)|
103+
| 'ng_no_services': [2, ['$http', '$resource', 'Restangular']] | Some services should be used only in a specific AngularJS service (Ajax-based service for example), in order to follow the separation of concerns paradigm. The second parameter specifies the services. The third parameter can be a list of angular objects (controller, factory, etc.). Or second parameter can be an object, where keys are angular object names and value is a list of services (like {controller: ['$http'], factory: ['$q']}) |
104104
| 'ng_on_watch': 2 | Watch and On methods on the scope object should be assigned to a variable, in order to be deleted in a $destroy event handler |
105-
| 'ng_rest_service': 0 | Check the service used to send request to your REST API. This rule can have one parameter, with tone he following value : $http, $resource or Restangular ('ng_rest_service': [0, '$http']).
105+
| 'ng_rest_service': 0 | Check the service used to send request to your REST API. This rule can have one parameter, with one of the following values: $http, $resource or Restangular ('ng_rest_service': [0, '$http']).
106106
| 'ng_service_name': 2 | All your services should have a name starting with the parameter you can define in your config object. The second parameter can be a Regexp wrapped in quotes. You can not prefix your services by "$" (reserved keyword for AngularJS services) ("ng_service_name": [2, "ng"]) [Y125](https://github.com/johnpapa/angular-styleguide#style-y125) |
107107
| 'ng_timeout_service': 2 | Instead of the default setTimeout function, you should use the AngularJS wrapper service $timeout [Y181](https://github.com/johnpapa/angular-styleguide#style-y181) |
108108
| 'ng_typecheck_array': 2 | You should use the angular.isArray method instead of the default JavaScript implementation (typeof [] === "[object Array]"). |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-angular",
3-
"version": "0.8.0",
3+
"version": "0.8.1",
44
"description": "ESLint rules for AngularJS projects",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)