diff --git a/src/app/config.js b/src/app/config.js index 40d53f5620..8b447a5b4e 100644 --- a/src/app/config.js +++ b/src/app/config.js @@ -4,7 +4,9 @@ angular .config(function ($stateProvider, $urlRouterProvider, $httpProvider, jwtInterceptorProvider, jwtOptionsProvider, $uibTooltipProvider, toastrConfig, $locationProvider, $qProvider, appSettings // @if !selfHosted + /* jshint ignore:start */ , stripeProvider + /* jshint ignore:end */ // @endif ) { angular.extend(appSettings, window.bitwardenAppSettings); diff --git a/src/app/organization/organizationBillingChangePaymentController.js b/src/app/organization/organizationBillingChangePaymentController.js index 82298a13d1..8b31b0452c 100644 --- a/src/app/organization/organizationBillingChangePaymentController.js +++ b/src/app/organization/organizationBillingChangePaymentController.js @@ -4,7 +4,9 @@ .controller('organizationBillingChangePaymentController', function ($scope, $state, $uibModalInstance, apiService, $analytics, toastr, existingPaymentMethod // @if !selfHosted + /* jshint ignore:start */ , stripe + /* jshint ignore:end */ // @endif ) { $analytics.eventTrack('organizationBillingChangePaymentController', { category: 'Modal' }); diff --git a/src/app/organization/organizationBillingController.js b/src/app/organization/organizationBillingController.js index d2d25f1239..0a8c559e6a 100644 --- a/src/app/organization/organizationBillingController.js +++ b/src/app/organization/organizationBillingController.js @@ -215,7 +215,7 @@ var url = appSettings.apiUri + '/organizations/' + $state.params.orgId + '/billing-invoice/' + charge.invoiceId + '?access_token=' + tokenService.getToken(); $window.open(url); - } + }; function load() { apiService.organizations.getBilling({ id: $state.params.orgId }, function (org) { diff --git a/src/app/organization/organizationSettingsExportController.js b/src/app/organization/organizationSettingsExportController.js index f85c0e69c8..7066825245 100644 --- a/src/app/organization/organizationSettingsExportController.js +++ b/src/app/organization/organizationSettingsExportController.js @@ -88,7 +88,6 @@ break; default: continue; - break; } exportCiphers.push(cipher); diff --git a/src/app/organization/organizationVaultController.js b/src/app/organization/organizationVaultController.js index d518c7c82c..b9d84a04e1 100644 --- a/src/app/organization/organizationVaultController.js +++ b/src/app/organization/organizationVaultController.js @@ -87,15 +87,16 @@ }); editModel.result.then(function (returnVal) { + var index; if (returnVal.action === 'edit') { - var index = $scope.ciphers.indexOf(cipher); + index = $scope.ciphers.indexOf(cipher); if (index > -1) { returnVal.data.collectionIds = $scope.ciphers[index].collectionIds; $scope.ciphers[index] = returnVal.data; } } else if (returnVal.action === 'delete') { - var index = $scope.ciphers.indexOf(cipher); + index = $scope.ciphers.indexOf(cipher); if (index > -1) { $scope.ciphers.splice(index, 1); } diff --git a/src/app/services/importService.js b/src/app/services/importService.js index 050a6bcf9e..51f9ade578 100644 --- a/src/app/services/importService.js +++ b/src/app/services/importService.js @@ -307,7 +307,7 @@ case 'login': case null: case undefined: cipher.type = constants.cipherType.login; - var totp = value.login_totp || value.totp + var totp = value.login_totp || value.totp; var uri = value.login_uri || value.uri; var username = value.login_username || value.username; var password = value.login_password || value.password; @@ -434,7 +434,7 @@ case 'login': case null: case undefined: cipher.type = constants.cipherType.login; - var totp = value.login_totp || value.totp + var totp = value.login_totp || value.totp; var uri = value.login_uri || value.uri; var username = value.login_username || value.username; var password = value.login_password || value.password; @@ -2319,6 +2319,7 @@ } var fields = []; + /* jshint ignore:start */ $.each(outterTable.find('table td:not(.subcaption)'), function (indexInArray, valueOfElement) { $(valueOfElement).find('br').replaceWith('\n'); var t = $(valueOfElement).text(); @@ -2326,6 +2327,7 @@ fields.push(t.split('\\n').join('\n')); } }); + /* jshint ignore:end */ if (fields.length && (fields.length % 2 === 0)) for (var j = 0; j < fields.length; j += 2) { diff --git a/src/app/settings/settingsBillingChangePaymentController.js b/src/app/settings/settingsBillingChangePaymentController.js index 57ab6462df..b1a50aac55 100644 --- a/src/app/settings/settingsBillingChangePaymentController.js +++ b/src/app/settings/settingsBillingChangePaymentController.js @@ -4,7 +4,9 @@ .controller('settingsBillingChangePaymentController', function ($scope, $state, $uibModalInstance, apiService, $analytics, toastr, existingPaymentMethod, appSettings, $timeout // @if !selfHosted + /* jshint ignore:start */ , stripe + /* jshint ignore:end */ // @endif ) { $analytics.eventTrack('settingsBillingChangePaymentController', { category: 'Modal' }); diff --git a/src/app/settings/settingsCreateOrganizationController.js b/src/app/settings/settingsCreateOrganizationController.js index 4cc07cdc04..9f5bbf4a13 100644 --- a/src/app/settings/settingsCreateOrganizationController.js +++ b/src/app/settings/settingsCreateOrganizationController.js @@ -4,7 +4,9 @@ .controller('settingsCreateOrganizationController', function ($scope, $state, apiService, cryptoService, toastr, $analytics, authService, constants, appSettings, validationService // @if !selfHosted + /* jshint ignore:start */ , stripe + /* jshint ignore:end */ // @endif ) { $scope.plans = constants.plans; diff --git a/src/app/settings/settingsPremiumController.js b/src/app/settings/settingsPremiumController.js index 65981b4509..ca9cd7f326 100644 --- a/src/app/settings/settingsPremiumController.js +++ b/src/app/settings/settingsPremiumController.js @@ -4,7 +4,9 @@ .controller('settingsPremiumController', function ($scope, $state, apiService, toastr, $analytics, authService, constants, $timeout, appSettings, validationService // @if !selfHosted + /* jshint ignore:start */ , stripe + /* jshint ignore:end */ // @endif ) { var profile = null; diff --git a/src/app/tools/toolsExportController.js b/src/app/tools/toolsExportController.js index bf1e4eb645..a03b7ef8b1 100644 --- a/src/app/tools/toolsExportController.js +++ b/src/app/tools/toolsExportController.js @@ -79,7 +79,6 @@ break; default: continue; - break; } exportCiphers.push(cipher); diff --git a/src/app/vault/vaultShareCipherController.js b/src/app/vault/vaultShareCipherController.js index 588571c771..cb7e405750 100644 --- a/src/app/vault/vaultShareCipherController.js +++ b/src/app/vault/vaultShareCipherController.js @@ -112,6 +112,7 @@ var attachmentSharePromises = []; if ($scope.cipher.attachments) { for (var i = 0; i < $scope.cipher.attachments.length; i++) { + /* jshint ignore:start */ (function (attachment) { var promise = cipherService.downloadAndDecryptAttachment(null, attachment, false) .then(function (decData) { @@ -136,6 +137,7 @@ }); attachmentSharePromises.push(promise); })($scope.cipher.attachments[i]); + /* jshint ignore:end */ } } diff --git a/src/app/vault/vaultSharedController.js b/src/app/vault/vaultSharedController.js index a61da83db6..b37f7bd8a3 100644 --- a/src/app/vault/vaultSharedController.js +++ b/src/app/vault/vaultSharedController.js @@ -142,10 +142,11 @@ }); editModel.result.then(function (returnVal) { - var rootCipher = findRootCipher(cipher) || { meta: {} }; + var rootCipher = findRootCipher(cipher) || { meta: {} }, + index; if (returnVal.action === 'edit') { - var index = $scope.ciphers.indexOf(cipher); + index = $scope.ciphers.indexOf(cipher); if (index > -1) { returnVal.data.collectionIds = $scope.ciphers[index].collectionIds; $scope.ciphers[index] = returnVal.data; @@ -163,7 +164,7 @@ cipher.favorite = rootCipher.favorite = returnVal.data.favorite; } else if (returnVal.action === 'delete') { - var index = $scope.ciphers.indexOf(cipher); + index = $scope.ciphers.indexOf(cipher); if (index > -1) { $scope.ciphers.splice(index, 1); }