Skip to content

Commit c6f5a71

Browse files
committed
Update docs script
1 parent 4d3c40d commit c6f5a71

File tree

2 files changed

+60
-60
lines changed

2 files changed

+60
-60
lines changed

README.md

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -92,95 +92,95 @@ Rules in eslint-plugin-angular are divided into several categories to help you b
9292

9393
The following rules detect patterns that can lead to errors.
9494

95-
* [avoid-scope-typos](docs/avoid-scope-typos.md) - Avoid mistakes when naming methods defined on the scope object
96-
* [module-getter](docs/module-getter.md) - disallow to reference modules with variables and require to use the getter syntax instead `angular.module('myModule')` ([y022](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y022))
97-
* [module-setter](docs/module-setter.md) - disallow to assign modules to variables (linked to [module-getter](docs/module-getter.md) ([y021](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y021))
98-
* [no-private-call](docs/no-private-call.md) - disallow use of internal angular properties prefixed with $$
95+
* [avoid-scope-typos](docs/rules/avoid-scope-typos.md) - Avoid mistakes when naming methods defined on the scope object
96+
* [module-getter](docs/rules/module-getter.md) - disallow to reference modules with variables and require to use the getter syntax instead `angular.module('myModule')` ([y022](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y022))
97+
* [module-setter](docs/rules/module-setter.md) - disallow to assign modules to variables (linked to [module-getter](docs/module-getter.md) ([y021](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y021))
98+
* [no-private-call](docs/rules/no-private-call.md) - disallow use of internal angular properties prefixed with $$
9999

100100
### Best Practices
101101

102102
These are rules designed to prevent you from making mistakes. They either prescribe a better way of doing something or help you avoid footguns..
103103

104-
* [component-limit](docs/component-limit.md) - limit the number of angular components per file ([y001](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y001))
105-
* [controller-as-route](docs/controller-as-route.md) - require the use of controllerAs in routes or states ([y031](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y031))
106-
* [controller-as-vm](docs/controller-as-vm.md) - require and specify a capture variable for `this` in controllers ([y032](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y032))
107-
* [controller-as](docs/controller-as.md) - disallow assignments to `$scope` in controllers ([y031](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y031))
108-
* [deferred](docs/deferred.md) - use `$q(function(resolve, reject){})` instead of `$q.deferred`
109-
* [di-unused](docs/di-unused.md) - disallow unused DI parameters
110-
* [directive-restrict](docs/directive-restrict.md) - disallow any other directive restrict than 'A' or 'E' ([y074](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y074))
111-
* [empty-controller](docs/empty-controller.md) - disallow empty controllers
112-
* [no-controller](docs/no-controller.md) - disallow use of controllers (according to the component first pattern)
113-
* [no-inline-template](docs/no-inline-template.md) - disallow the use of inline templates
114-
* [no-run-logic](docs/no-run-logic.md) - keep run functions clean and simple ([y171](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y171))
115-
* [no-services](docs/no-services.md) - disallow DI of specified services for other angular components (`$http` for controllers, filters and directives)
116-
* [on-watch](docs/on-watch.md) - require `$on` and `$watch` deregistration callbacks to be saved in a variable
117-
* [prefer-component](docs/prefer-component.md) -
104+
* [component-limit](docs/rules/component-limit.md) - limit the number of angular components per file ([y001](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y001))
105+
* [controller-as-route](docs/rules/controller-as-route.md) - require the use of controllerAs in routes or states ([y031](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y031))
106+
* [controller-as-vm](docs/rules/controller-as-vm.md) - require and specify a capture variable for `this` in controllers ([y032](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y032))
107+
* [controller-as](docs/rules/controller-as.md) - disallow assignments to `$scope` in controllers ([y031](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y031))
108+
* [deferred](docs/rules/deferred.md) - use `$q(function(resolve, reject){})` instead of `$q.deferred`
109+
* [di-unused](docs/rules/di-unused.md) - disallow unused DI parameters
110+
* [directive-restrict](docs/rules/directive-restrict.md) - disallow any other directive restrict than 'A' or 'E' ([y074](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y074))
111+
* [empty-controller](docs/rules/empty-controller.md) - disallow empty controllers
112+
* [no-controller](docs/rules/no-controller.md) - disallow use of controllers (according to the component first pattern)
113+
* [no-inline-template](docs/rules/no-inline-template.md) - disallow the use of inline templates
114+
* [no-run-logic](docs/rules/no-run-logic.md) - keep run functions clean and simple ([y171](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y171))
115+
* [no-services](docs/rules/no-services.md) - disallow DI of specified services for other angular components (`$http` for controllers, filters and directives)
116+
* [on-watch](docs/rules/on-watch.md) - require `$on` and `$watch` deregistration callbacks to be saved in a variable
117+
* [prefer-component](docs/rules/prefer-component.md) -
118118

119119
### Deprecated Angular Features
120120

121121
These rules prevent you from using deprecated angular features.
122122

123-
* [no-cookiestore](docs/no-cookiestore.md) - use `$cookies` instead of `$cookieStore`
124-
* [no-directive-replace](docs/no-directive-replace.md) - disallow the deprecated directive replace property
125-
* [no-http-callback](docs/no-http-callback.md) - disallow the `$http` methods `success()` and `error()`
123+
* [no-cookiestore](docs/rules/no-cookiestore.md) - use `$cookies` instead of `$cookieStore`
124+
* [no-directive-replace](docs/rules/no-directive-replace.md) - disallow the deprecated directive replace property
125+
* [no-http-callback](docs/rules/no-http-callback.md) - disallow the `$http` methods `success()` and `error()`
126126
127127
### Naming
128128
129129
These rules help you to specify several naming conventions.
130130
131-
* [component-name](docs/component-name.md) - require and specify a prefix for all component names
132-
* [constant-name](docs/constant-name.md) - require and specify a prefix for all constant names ([y125](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y125))
133-
* [controller-name](docs/controller-name.md) - require and specify a prefix for all controller names ([y123](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y123), [y124](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y124))
134-
* [directive-name](docs/directive-name.md) - require and specify a prefix for all directive names ([y073](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y073), [y126](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y126))
135-
* [factory-name](docs/factory-name.md) - require and specify a prefix for all factory names ([y125](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y125))
136-
* [file-name](docs/file-name.md) - require and specify a consistent component name pattern ([y120](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y120), [y121](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y121))
137-
* [filter-name](docs/filter-name.md) - require and specify a prefix for all filter names
138-
* [module-name](docs/module-name.md) - require and specify a prefix for all module names ([y127](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y127))
139-
* [provider-name](docs/provider-name.md) - require and specify a prefix for all provider names ([y125](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y125))
140-
* [service-name](docs/service-name.md) - require and specify a prefix for all service names ([y125](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y125))
141-
* [value-name](docs/value-name.md) - require and specify a prefix for all value names ([y125](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y125))
131+
* [component-name](docs/rules/component-name.md) - require and specify a prefix for all component names
132+
* [constant-name](docs/rules/constant-name.md) - require and specify a prefix for all constant names ([y125](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y125))
133+
* [controller-name](docs/rules/controller-name.md) - require and specify a prefix for all controller names ([y123](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y123), [y124](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y124))
134+
* [directive-name](docs/rules/directive-name.md) - require and specify a prefix for all directive names ([y073](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y073), [y126](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y126))
135+
* [factory-name](docs/rules/factory-name.md) - require and specify a prefix for all factory names ([y125](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y125))
136+
* [file-name](docs/rules/file-name.md) - require and specify a consistent component name pattern ([y120](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y120), [y121](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y121))
137+
* [filter-name](docs/rules/filter-name.md) - require and specify a prefix for all filter names
138+
* [module-name](docs/rules/module-name.md) - require and specify a prefix for all module names ([y127](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y127))
139+
* [provider-name](docs/rules/provider-name.md) - require and specify a prefix for all provider names ([y125](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y125))
140+
* [service-name](docs/rules/service-name.md) - require and specify a prefix for all service names ([y125](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y125))
141+
* [value-name](docs/rules/value-name.md) - require and specify a prefix for all value names ([y125](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y125))
142142
143143
### Conventions
144144
145145
Angular often provide multi ways to to something. These rules help you to define convention for your project.
146146
147-
* [di-order](docs/di-order.md) - require DI parameters to be sorted alphabetically
148-
* [di](docs/di.md) - require a consistent DI syntax
149-
* [dumb-inject](docs/dumb-inject.md) - unittest `inject` functions should only consist of assignments from injected values to describe block variables
150-
* [function-type](docs/function-type.md) - require and specify a consistent function style for components ('named' or 'anonymous') ([y024](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y024))
151-
* [module-dependency-order](docs/module-dependency-order.md) - require a consistent order of module dependencies
152-
* [no-service-method](docs/no-service-method.md) - use `factory()` instead of `service()` ([y040](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y040))
153-
* [one-dependency-per-line](docs/one-dependency-per-line.md) - require all DI parameters to be located in their own line
154-
* [rest-service](docs/rest-service.md) - disallow different rest service and specify one of '$http', '$resource', 'Restangular'
155-
* [watchers-execution](docs/watchers-execution.md) - require and specify consistent use `$scope.digest()` or `$scope.apply()`
147+
* [di-order](docs/rules/di-order.md) - require DI parameters to be sorted alphabetically
148+
* [di](docs/rules/di.md) - require a consistent DI syntax
149+
* [dumb-inject](docs/rules/dumb-inject.md) - unittest `inject` functions should only consist of assignments from injected values to describe block variables
150+
* [function-type](docs/rules/function-type.md) - require and specify a consistent function style for components ('named' or 'anonymous') ([y024](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y024))
151+
* [module-dependency-order](docs/rules/module-dependency-order.md) - require a consistent order of module dependencies
152+
* [no-service-method](docs/rules/no-service-method.md) - use `factory()` instead of `service()` ([y040](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y040))
153+
* [one-dependency-per-line](docs/rules/one-dependency-per-line.md) - require all DI parameters to be located in their own line
154+
* [rest-service](docs/rules/rest-service.md) - disallow different rest service and specify one of '$http', '$resource', 'Restangular'
155+
* [watchers-execution](docs/rules/watchers-execution.md) - require and specify consistent use `$scope.digest()` or `$scope.apply()`
156156
157157
### Angular Wrappers
158158
159159
These rules help you to enforce the usage of angular wrappers.
160160
161-
* [angularelement](docs/angularelement.md) - use `angular.element` instead of `$` or `jQuery`
162-
* [definedundefined](docs/definedundefined.md) - use `angular.isDefined` and `angular.isUndefined` instead of other undefined checks
163-
* [document-service](docs/document-service.md) - use `$document` instead of `document` ([y180](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y180))
164-
* [foreach](docs/foreach.md) - use `angular.forEach` instead of native `Array.prototype.forEach`
165-
* [interval-service](docs/interval-service.md) - use `$interval` instead of `setInterval` ([y181](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y181))
166-
* [json-functions](docs/json-functions.md) - use `angular.fromJson` and 'angular.toJson' instead of `JSON.parse` and `JSON.stringify`
167-
* [log](docs/log.md) - use the `$log` service instead of the `console` methods
168-
* [no-angular-mock](docs/no-angular-mock.md) - require to use `angular.mock` methods directly
169-
* [no-jquery-angularelement](docs/no-jquery-angularelement.md) - disallow to wrap `angular.element` objects with `jQuery` or `$`
170-
* [timeout-service](docs/timeout-service.md) - use `$timeout` instead of `setTimeout` ([y181](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y181))
171-
* [typecheck-array](docs/typecheck-array.md) - use `angular.isArray` instead of `typeof` comparisons
172-
* [typecheck-date](docs/typecheck-date.md) - use `angular.isDate` instead of `typeof` comparisons
173-
* [typecheck-function](docs/typecheck-function.md) - use `angular.isFunction` instead of `typeof` comparisons
174-
* [typecheck-number](docs/typecheck-number.md) - use `angular.isNumber` instead of `typeof` comparisons
175-
* [typecheck-object](docs/typecheck-object.md) - use `angular.isObject` instead of `typeof` comparisons
176-
* [typecheck-string](docs/typecheck-string.md) - use `angular.isString` instead of `typeof` comparisons
177-
* [window-service](docs/window-service.md) - use `$window` instead of `window` ([y180](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y180))
161+
* [angularelement](docs/rules/angularelement.md) - use `angular.element` instead of `$` or `jQuery`
162+
* [definedundefined](docs/rules/definedundefined.md) - use `angular.isDefined` and `angular.isUndefined` instead of other undefined checks
163+
* [document-service](docs/rules/document-service.md) - use `$document` instead of `document` ([y180](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y180))
164+
* [foreach](docs/rules/foreach.md) - use `angular.forEach` instead of native `Array.prototype.forEach`
165+
* [interval-service](docs/rules/interval-service.md) - use `$interval` instead of `setInterval` ([y181](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y181))
166+
* [json-functions](docs/rules/json-functions.md) - use `angular.fromJson` and 'angular.toJson' instead of `JSON.parse` and `JSON.stringify`
167+
* [log](docs/rules/log.md) - use the `$log` service instead of the `console` methods
168+
* [no-angular-mock](docs/rules/no-angular-mock.md) - require to use `angular.mock` methods directly
169+
* [no-jquery-angularelement](docs/rules/no-jquery-angularelement.md) - disallow to wrap `angular.element` objects with `jQuery` or `$`
170+
* [timeout-service](docs/rules/timeout-service.md) - use `$timeout` instead of `setTimeout` ([y181](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y181))
171+
* [typecheck-array](docs/rules/typecheck-array.md) - use `angular.isArray` instead of `typeof` comparisons
172+
* [typecheck-date](docs/rules/typecheck-date.md) - use `angular.isDate` instead of `typeof` comparisons
173+
* [typecheck-function](docs/rules/typecheck-function.md) - use `angular.isFunction` instead of `typeof` comparisons
174+
* [typecheck-number](docs/rules/typecheck-number.md) - use `angular.isNumber` instead of `typeof` comparisons
175+
* [typecheck-object](docs/rules/typecheck-object.md) - use `angular.isObject` instead of `typeof` comparisons
176+
* [typecheck-string](docs/rules/typecheck-string.md) - use `angular.isString` instead of `typeof` comparisons
177+
* [window-service](docs/rules/window-service.md) - use `$window` instead of `window` ([y180](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y180))
178178
179179
### Misspelling
180180
181181
These rules help you avoiding misspellings.
182182
183-
* [on-destroy](docs/on-destroy.md) - Check for common misspelling $on('destroy', ...).
183+
* [on-destroy](docs/rules/on-destroy.md) - Check for common misspelling $on('destroy', ...).
184184
185185
186186
----

scripts/templates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var _ = require('lodash');
55

66
var templates = {
77
ruleSourcePath: _.template('rules/<%= ruleName %>.js'),
8-
ruleDocumentationPath: _.template('docs/<%= ruleName %>.md'),
8+
ruleDocumentationPath: _.template('docs/rules/<%= ruleName %>.md'),
99
ruleExamplesPath: _.template('examples/<%= ruleName %>.js'),
1010
styleguide: _.template('[<%= name %> by <%= type %> - <%= description %>](<%= link %>)'),
1111
styleguideShort: _.template('[<%= name %>](<%= link %>)'),

0 commit comments

Comments
 (0)