EmmanuelDemey / EmmanuelDemey/eslint-plugin-angular

Differentiate between 'constructor' services and 'non-constructor' services in naming rules.

Open
#418 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
620
Forks
127
PR merge metrics
No merged PRs in 30d

Description

Why?
- There are different kinds of services, so it makes sense to have rules for distinctively naming them.
- Consider the following:
- Injecting `serviceName` as an argument provides a `constructor function`.
- Injecting `factoryName` as an argument provides a `value returned from a function`.

Suggested Implementation:
- Define a rule such as `angular/service-constructor-name` to target `constructor` services.
- Use `UpperCamelCase` as the default naming convention for `constructor` services.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.