Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 1023 Bytes

module-setter.md

File metadata and controls

36 lines (20 loc) · 1023 Bytes

module-setter - disallow to assign modules to variables

Declare modules without a variable using the setter syntax.

Rule based on Angular 1.x

Styleguide Reference

Examples

The following patterns are considered problems;

/*eslint angular/module-setter: 2*/

// invalid
var app = angular.module('myModule', []); // error: Declare modules without a variable using the setter syntax.

The following patterns are not considered problems;

/*eslint angular/module-setter: 2*/

// valid
angular.module('myModule', [])

Version

This rule was introduced in eslint-plugin-angular 0.1.0

Links