All your providers 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 providers by "$" (reserved keyword for AngularJS services) ("provider-name": [2, "ng"]) *
Styleguide Reference
The following patterns are not considered problems when configured "prefix"
:
/*eslint angular/provider-name: [2,"prefix"]*/
// valid
angular.module('myModule').provider('prefixProvider', function () {
// ...
});
The following patterns are considered problems when configured "/^xyz/"
:
/*eslint angular/provider-name: [2,"/^xyz/"]*/
// invalid
angular.module('myModule').provider('otherProvider', function () {
// ...
}); // error: The otherProvider provider should follow this pattern: /^xyz/
The following patterns are not considered problems when configured "/^xyz/"
:
/*eslint angular/provider-name: [2,"/^xyz/"]*/
// valid
angular.module('myModule').provider('xyzProvider', function () {
// ...
});
The following patterns are considered problems when configured "xyz"
:
/*eslint angular/provider-name: [2,"xyz"]*/
// invalid
angular.module('myModule').provider('myProvider', function () {
// ...
}); // error: The myProvider provider should be prefixed by xyz
This rule was introduced in eslint-plugin-angular 0.1.0