@@ -6,14 +6,16 @@ All your components should have a name starting with the parameter you can defin
66The second parameter can be a Regexp wrapped in quotes.
77You 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
1113The 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
0 commit comments