Skip to content

Commit 96dcf23

Browse files
committed
Generate docs for new rules
1 parent fab601f commit 96dcf23

File tree

6 files changed

+19
-18
lines changed

6 files changed

+19
-18
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,16 @@ These rules prevent you from using deprecated angular features.
136136
These rules help you to specify several naming conventions.
137137
138138
* [component-name](docs/component-name.md) - require and specify a prefix for all component names
139+
* [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))
139140
* [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))
140141
* [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))
142+
* [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))
141143
* [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))
142144
* [filter-name](docs/filter-name.md) - require and specify a prefix for all filter names
143145
* [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))
146+
* [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))
144147
* [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))
148+
* [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))
145149
146150
### Conventions
147151

docs/constant-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The following patterns are considered problems when configured `"xyz"`:
5151

5252
## Version
5353

54-
This rule was introduced in eslint-plugin-angular 1.4.1
54+
This rule was introduced in eslint-plugin-angular 0.1.0
5555

5656
## Links
5757

docs/factory-name.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# factory-name - require and specify a prefix for all factory names
44

5-
All your factories should have a name starting with the parameter you can define in your config object.
5+
All your factorys should have a name starting with the parameter you can define in your config object.
66
The second parameter can be a Regexp wrapped in quotes.
7-
You can not prefix your factories by "$" (reserved keyword for AngularJS services) ("factory-name": [2, "ng"])
7+
You can not prefix your factorys by "$" (reserved keyword for AngularJS services) ("factory-name": [2, "ng"])
88
*
99

1010
**Styleguide Reference**
@@ -51,7 +51,7 @@ The following patterns are considered problems when configured `"xyz"`:
5151

5252
## Version
5353

54-
This rule was introduced in eslint-plugin-angular 1.4.1
54+
This rule was introduced in eslint-plugin-angular 0.1.0
5555

5656
## Links
5757

docs/provider-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The following patterns are considered problems when configured `"xyz"`:
5151

5252
## Version
5353

54-
This rule was introduced in eslint-plugin-angular 1.4.1
54+
This rule was introduced in eslint-plugin-angular 0.1.0
5555

5656
## Links
5757

docs/service-name.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55
All your services should have a name starting with the parameter you can define in your config object.
66
The second parameter can be a Regexp wrapped in quotes.
7-
Please note, that the rule will be changed in future version to only support `angular.Module#service()`.
8-
If you want the new behavior use the flag `{oldBehavior: false}`.
9-
For factories, providers, constants and values, you can should use their rules.
10-
You can not prefix your services by "$" (reserved keyword for AngularJS services) ("service-name": [2, "ng", {oldBehavior: false}])
7+
You can not prefix your services by "$" (reserved keyword for AngularJS services) ("service-name": [2, "ng"])
118
*
129

1310
**Rule based on Angular 1.x**
@@ -18,36 +15,36 @@ You can not prefix your services by "$" (reserved keyword for AngularJS services
1815

1916
## Examples
2017

21-
The following patterns are **not** considered problems when configured `"prefix"`:
18+
The following patterns are **not** considered problems when configured `"prefix"` and `{"oldBehavior":false}`:
2219

23-
/*eslint angular/service-name: [2,"prefix",{oldBehavior: false}]*/
20+
/*eslint angular/service-name: [2,"prefix",{"oldBehavior":false}]*/
2421

2522
// valid
2623
angular.module('myModule').service('prefixService', function () {
2724
// ...
2825
});
2926

30-
The following patterns are considered problems when configured `"/^xyz/"`:
27+
The following patterns are considered problems when configured `"/^xyz/"` and `{"oldBehavior":false}`:
3128

32-
/*eslint angular/service-name: [2,"/^xyz/",{oldBehavior: false}]*/
29+
/*eslint angular/service-name: [2,"/^xyz/",{"oldBehavior":false}]*/
3330

3431
// invalid
3532
angular.module('myModule').service('otherService', function () {
3633
// ...
3734
}); // error: The otherService service should follow this pattern: /^xyz/
3835

39-
The following patterns are **not** considered problems when configured `"/^xyz/"`:
36+
The following patterns are **not** considered problems when configured `"/^xyz/"` and `{"oldBehavior":false}`:
4037

41-
/*eslint angular/service-name: [2,"/^xyz/",{oldBehavior: false}]*/
38+
/*eslint angular/service-name: [2,"/^xyz/",{"oldBehavior":false}]*/
4239

4340
// valid
4441
angular.module('myModule').service('xyzService', function () {
4542
// ...
4643
});
4744

48-
The following patterns are considered problems when configured `"xyz"`:
45+
The following patterns are considered problems when configured `"xyz"` and `{"oldBehavior":false}`:
4946

50-
/*eslint angular/service-name: [2,"xyz",{oldBehavior: false}]*/
47+
/*eslint angular/service-name: [2,"xyz",{"oldBehavior":false}]*/
5148

5249
// invalid
5350
angular.module('myModule').service('myService', function () {

docs/value-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The following patterns are considered problems when configured `"xyz"`:
5151

5252
## Version
5353

54-
This rule was introduced in eslint-plugin-angular 1.4.1
54+
This rule was introduced in eslint-plugin-angular 0.1.0
5555

5656
## Links
5757

0 commit comments

Comments
 (0)