Skip to content

Commit b919034

Browse files
Merge pull request #423 from Gillespie59/development
1.5.0
2 parents 369088d + f864a8c commit b919034

File tree

116 files changed

+267
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+267
-35
lines changed

docs/angularelement.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
The angular.element method should be used instead of the $ or jQuery object (if you are using jQuery of course).
66
If the jQuery library is imported, angular.element will be a wrapper around the jQuery object.
77

8+
**Rule based on Angular 1.x**
9+
810
## Examples
911

1012
The following patterns are considered problems;

docs/component-limit.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ The default limit is one.
77

88
- The acceptable number of components. (Default: 1)
99

10+
**Rule based on Angular 1.x**
11+
1012
**Styleguide Reference**
1113

1214
* [y001 by johnpapa - Define 1 component per file](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y001)

docs/component-name.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ All your components should have a name starting with the parameter you can defin
66
The second parameter can be a Regexp wrapped in quotes.
77
You can not prefix your components by "ng" (reserved keyword for AngularJS components) ("component-name": [2, "ng"])
88

9+
**Rule based on Angular 1.x**
10+
911
## Examples
1012

1113
The following patterns are **not** considered problems when configured `"prefix"`:
1214

1315
/*eslint angular/component-name: [2,"prefix"]*/
1416

1517
// valid
16-
angular.module('myModule').component('prefixTabs', function () {
18+
angular.module('myModule').component('prefixTabs', {
1719
// ...
1820
});
1921

@@ -22,7 +24,7 @@ The following patterns are considered problems when configured `"/^ui/"`:
2224
/*eslint angular/component-name: [2,"/^ui/"]*/
2325

2426
// invalid
25-
angular.module('myModule').component('navigation', function () {
27+
angular.module('myModule').component('navigation', {
2628
// ...
2729
}); // error: The navigation component should follow this pattern: /^ui/
2830

@@ -31,7 +33,7 @@ The following patterns are **not** considered problems when configured `"/^ui/"`
3133
/*eslint angular/component-name: [2,"/^ui/"]*/
3234

3335
// valid
34-
angular.module('myModule').component('uiNavigation', function () {
36+
angular.module('myModule').component('uiNavigation', {
3537
// ...
3638
});
3739

@@ -40,7 +42,7 @@ The following patterns are considered problems when configured `"ui"`:
4042
/*eslint angular/component-name: [2,"ui"]*/
4143

4244
// invalid
43-
angular.module('myModule').component('tabs', function () {
45+
angular.module('myModule').component('tabs', {
4446
// ...
4547
}); // error: The tabs component should be prefixed by ui
4648

docs/controller-as-route.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
You should use Angular's controllerAs syntax when defining routes or states.
66

7+
**Rule based on Angular 1.x**
8+
79
**Styleguide Reference**
810

911
* [y031 by johnpapa - controllerAs Controller Syntax](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y031)

docs/controller-as-vm.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ The third parameter can be a Regexp for identifying controller functions (when u
88

99
- The name that should be used for the view model.
1010

11+
**Rule based on Angular 1.x**
12+
1113
**Styleguide Reference**
1214

1315
* [y032 by johnpapa - controllerAs with vm](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y032)

docs/controller-as.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ You should not set properties on $scope in controllers.
66
Use controllerAs syntax and add data to 'this'.
77
The second parameter can be a Regexp for identifying controller functions (when using something like Browserify)
88

9+
**Rule based on Angular 1.x**
10+
911
**Styleguide Reference**
1012

1113
* [y031 by johnpapa - controllerAs Controller Syntax](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y031)

docs/controller-name.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ All your controllers should have a name starting with the parameter you can defi
66
The second parameter can be a Regexp wrapped in quotes.
77
("controller-name": [2, "ng"])
88

9+
**Rule based on Angular 1.x**
10+
911
**Styleguide Reference**
1012

1113
* [y123 by johnpapa - Controller Names](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y123)

docs/deferred.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
When you want to create a new promise, you should not use the $q.deferred anymore.
66
Prefer the new syntax : $q(function(resolve, reject){})
77

8+
**Rule based on Angular 1.x**
9+
810
## Examples
911

1012
The following patterns are considered problems;

docs/definedundefined.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
You should use the angular.isUndefined or angular.isDefined methods instead of using the keyword undefined.
66
We also check the use of !angular.isUndefined and !angular.isDefined (should prefer the reverse function)
77

8+
**Rule based on Angular 1.x**
9+
810
## Examples
911

1012
The following patterns are considered problems;

docs/di-order.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
# di-order - require DI parameters to be sorted alphabetically
44

55
Injected dependencies should be sorted alphabetically.
6-
If the second parameter is set to `true`, values which start and end with an underscore those underscores are stripped.
6+
If the second parameter is set to false, values which start and end with an underscore those underscores are stripped.
77
This means for example that `_$httpBackend_` goes before `_$http_`.
88

9+
**Rule based on Angular 1.x**
10+
911
## Examples
1012

1113
The following patterns are considered problems with default config;

0 commit comments

Comments
 (0)