Prefer having a prefix for all component namesJS-0533
angularjs
It is recommended to use consistent nomenclature of components across the codebase. Consistency within the project is important for the team because it provides tremendous efficiency. The naming conventions should help you find your code faster and make it easier to understand.
We recommend not to prefix the components by ng as it is a reserved keyword for AngularJS components. This issue is recommended for Angular v1.x versions.
Note: This issue is reported when the project has an existing ESLint configuration file.
Bad Practice
// error: The navigation component should follow this pattern: /^ui/
angular
.module('myModule')
.component('navigation', {
// ...
});
Recommended
angular
.module('myModule')
.component('prefixTabs', {
// ...
});