In my Angular app, I have the following code snippet:
'use strict';
angular.module('fooApp')
.controller('FooCtrl', function ($scope) {
});
After running JSHint with an indent of 4, I encountered the error below:
[L6:C5] W015: Expected '}' to have an indentation at 1 instead at 5.
});
Is there a way to configure JSHint to allow for the chaining indentation in this scenario?
Update:
I discovered that if I modify the FooCtrl
function by adding a body as shown below, JSHint does not flag any issues:
'use strict';
angular.module('fooApp')
.controller('FooCtrl', function ($scope) {
$scope.foo = {};
});
Does anyone understand why this change resolves the JSHint error?