JavaScript

JavaScript

Made by DeepSource

Prevent assigning modules to variables JS-0515

Style
Major
angularjs

It is a good practice to use one component per file. There is rarely a need to introduce a variable to a module. The developers should declare modules without variable declaration.

Bad Practice

var app = angular.module('app', [
    'ngAnimate',
    'ngRoute',
    'app.shared',
    'app.dashboard'
]);

Recommended

angular
    .module('app', [
        'ngAnimate',
        'ngRoute',
        'app.shared',
        'app.dashboard'
    ]);

References