diff --git a/.jscs.json b/.jscs.json index a5444f7d..d8e4400b 100644 --- a/.jscs.json +++ b/.jscs.json @@ -6,6 +6,7 @@ "disallowSpaceAfterObjectKeys": true, "disallowSpaceAfterPrefixUnaryOperators": ["!"], "disallowSpaceBeforeBinaryOperators": [","], + "disallowTrailingComma": true, "disallowTrailingWhitespace": true, "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"] } diff --git a/test/auto/injectorSpec.js b/test/auto/injectorSpec.js index 1f6f18e1..e3ecab3b 100644 --- a/test/auto/injectorSpec.js +++ b/test/auto/injectorSpec.js @@ -960,7 +960,7 @@ describe('strict-di injector', function() { it('should throw if magic annotation is used by provider', function() { module(function($provide) { $provide.provider({ - '$test': function() { this.$get = function($rootScope) { return $rootScope; }; }, + '$test': function() { this.$get = function($rootScope) { return $rootScope; }; } }); }); inject(function($injector) { @@ -974,7 +974,7 @@ describe('strict-di injector', function() { it('should throw if magic annotation is used by factory', function() { module(function($provide) { $provide.factory({ - '$test': function($rootScope) { return function() {}; }, + '$test': function($rootScope) { return function() {}; } }); }); inject(function($injector) { diff --git a/test/loaderSpec.js b/test/loaderSpec.js index dbe63726..8d7789ac 100644 --- a/test/loaderSpec.js +++ b/test/loaderSpec.js @@ -52,7 +52,7 @@ describe('module loader', function() { ['$provide', 'value', ['k', 'v'] ], ['$filterProvider', 'register', ['f', 'ff'] ], ['$compileProvider', 'directive', ['d', 'dd'] ], - ['$controllerProvider', 'register', ['ctrl', 'ccc']], + ['$controllerProvider', 'register', ['ctrl', 'ccc']] ]); expect(myModule._configBlocks).toEqual([ ['$injector', 'invoke', ['config'] ], diff --git a/test/ng/browserSpecs.js b/test/ng/browserSpecs.js index 99564dde..3548a5a2 100755 --- a/test/ng/browserSpecs.js +++ b/test/ng/browserSpecs.js @@ -54,7 +54,7 @@ function MockWindow(options) { replace: function(url) { locationHref = url; mockWindow.history.state = null; - }, + } }; this.history = { @@ -81,7 +81,7 @@ function MockWindow(options) { ieState = value; }, configurable: true, - enumerable: true, + enumerable: true }); } } diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index fa758bca..aeb24e0d 100755 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -295,7 +295,7 @@ describe('$compile', function() { directive('svgCircleUrl', valueFn({ replace: true, templateUrl: 'template.html', - templateNamespace: 'SVG', + templateNamespace: 'SVG' })); }); inject(function($compile, $rootScope, $httpBackend) { @@ -1058,7 +1058,7 @@ describe('$compile', function() { template: '{{pow}}', templateNamespace: 'MATH', scope: { - pow: '@pow', + pow: '@pow' }, link: function(scope, elm, attr, ctrl, transclude) { transclude(function(node) { @@ -1972,7 +1972,7 @@ describe('$compile', function() { templateUrl: 'template.html', templateNamespace: 'math', scope: { - pow: '@pow', + pow: '@pow' }, link: function(scope, elm, attr, ctrl, transclude) { transclude(function(node) { @@ -3185,7 +3185,7 @@ describe('$compile', function() { 'toString': '&', // Spidermonkey extension, may be obsolete in the future - 'watch': '=', + 'watch': '=' } })); }); diff --git a/test/ng/directive/selectSpec.js b/test/ng/directive/selectSpec.js index 30ad415b..e4518f0b 100644 --- a/test/ng/directive/selectSpec.js +++ b/test/ng/directive/selectSpec.js @@ -1988,7 +1988,7 @@ describe('select', function() { createSelect({ 'name': 'select', 'ng-model': 'value', - 'ng-options': 'item for item in [\'first\', \'second\', \'third\', \'fourth\']', + 'ng-options': 'item for item in [\'first\', \'second\', \'third\', \'fourth\']' }); scope.form.select.$parsers.push(function(value) { @@ -2005,7 +2005,7 @@ describe('select', function() { createSelect({ 'name': 'select', 'ng-model': 'value', - 'ng-options': 'item for item in [\'the first\', \'the second\', \'the third\', \'the fourth\']', + 'ng-options': 'item for item in [\'the first\', \'the second\', \'the third\', \'the fourth\']' }); scope.form.select.$formatters.push(function(value) { @@ -2022,7 +2022,7 @@ describe('select', function() { createSelect({ 'name': 'select', 'ng-model': 'value', - 'ng-options': 'item for item in [\'first\', \'second\', \'third\', \'fourth\']', + 'ng-options': 'item for item in [\'first\', \'second\', \'third\', \'fourth\']' }); scope.form.select.$validators.fail = function() { @@ -2040,7 +2040,7 @@ describe('select', function() { createSelect({ 'name': 'select', 'ng-model': 'value', - 'ng-options': 'item for item in [\'first\', \'second\', \'third\', \'fourth\']', + 'ng-options': 'item for item in [\'first\', \'second\', \'third\', \'fourth\']' }); scope.form.select.$validators.pass = function() { @@ -2059,7 +2059,7 @@ describe('select', function() { createSelect({ 'name': 'select', 'ng-model': 'value', - 'ng-options': 'item for item in [\'first\', \'second\', \'third\', \'fourth\']', + 'ng-options': 'item for item in [\'first\', \'second\', \'third\', \'fourth\']' }); scope.form.select.$asyncValidators.async = function() { @@ -2085,7 +2085,7 @@ describe('select', function() { createSelect({ 'name': 'select', 'ng-model': 'value', - 'ng-options': 'item for item in [\'first\', \'second\', \'third\', \'fourth\']', + 'ng-options': 'item for item in [\'first\', \'second\', \'third\', \'fourth\']' }); scope.form.select.$asyncValidators.async = function() { diff --git a/test/ng/rafSpec.js b/test/ng/rafSpec.js index c16e0020..04ac6de2 100644 --- a/test/ng/rafSpec.js +++ b/test/ng/rafSpec.js @@ -39,7 +39,7 @@ describe('$$rAF', function() { var injector = createInjector(['ng', function($provide) { $provide.value('$timeout', timeoutSpy); $provide.value('$window', { - location: window.location, + location: window.location }); }]); diff --git a/test/ngMessages/messagesSpec.js b/test/ngMessages/messagesSpec.js index 3d73c7cf..a0b39ddf 100644 --- a/test/ngMessages/messagesSpec.js +++ b/test/ngMessages/messagesSpec.js @@ -361,7 +361,7 @@ describe('ngMessages', function() { $rootScope.$apply(function() { $rootScope.data = { 'a': 1, - 'b': 2, + 'b': 2 }; });