Reduce JSHint errors/warnings

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
pull/7077/head
Morris Jobke 7 years ago
parent 576d31d48d
commit d790c27a19
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
  1. 5
      .jshintrc
  2. 2
      core/js/js.js
  3. 4
      core/js/tests/specs/coreSpec.js
  4. 2
      core/js/tests/specs/files/clientSpec.js
  5. 4
      core/js/tests/specs/jquery.avatarSpec.js
  6. 10
      core/js/tests/specs/mimeTypeSpec.js
  7. 1
      core/js/tests/specs/sharedialoglinkshareview.js
  8. 1
      core/js/tests/specs/sharedialogshareelistview.js
  9. 1
      core/js/tests/specs/sharedialogviewSpec.js

@ -28,7 +28,10 @@
"_": true,
"OC": true,
"OCA": true,
"OCP": true,
"t": true,
"n": true
"n": true,
"escapeHTML": true,
"Promise": true
}
}

@ -1512,7 +1512,7 @@ function initCore() {
var resizeMenu = function() {
var appList = $('#appmenu li');
var headerWidth = $('.header-left').width() - $('#nextcloud').width()
var headerWidth = $('.header-left').width() - $('#nextcloud').width();
var usePercentualAppMenuLimit = 0.33;
var minAppsDesktop = 8;
var availableWidth = headerWidth - $(appList).width();

@ -256,10 +256,10 @@ describe('Core base tests', function() {
describe('filePath', function() {
beforeEach(function() {
OC.webroot = 'http://localhost';
OC.appswebroots['files'] = OC.webroot + '/apps3/files';
OC.appswebroots.files = OC.webroot + '/apps3/files';
});
afterEach(function() {
delete OC.appswebroots['files'];
delete OC.appswebroots.files;
});
it('Uses a direct link for css and images,' , function() {

@ -448,7 +448,7 @@ describe('OC.Files.Client tests', function() {
expect(info.id).toEqual(11);
// file entry
var info = response[1];
info = response[1];
expect(info instanceof OC.Files.FileInfo).toEqual(true);
expect(info.id).toEqual(51);

@ -11,7 +11,7 @@
describe('jquery.avatar tests', function() {
var $div;
var devicePixelRatio
var devicePixelRatio;
beforeEach(function() {
$('#testArea').append($('<div id="avatardiv">'));
@ -24,7 +24,7 @@ describe('jquery.avatar tests', function() {
afterEach(function() {
$div.remove();
window.devicePixelRatio = devicePixelRatio
window.devicePixelRatio = devicePixelRatio;
});
describe('size', function() {

@ -26,17 +26,17 @@ describe('MimeType tests', function() {
beforeEach(function() {
_files = OC.MimeTypeList.files;
_aliases = OC.MimeTypeList.aliases;
_theme = OC.MimeTypeList.themes['abc'];
_theme = OC.MimeTypeList.themes.abc;
OC.MimeTypeList.files = ['folder', 'folder-shared', 'folder-external', 'foo-bar', 'foo', 'file'];
OC.MimeTypeList.aliases = {'app/foobar': 'foo/bar'};
OC.MimeTypeList.themes['abc'] = ['folder'];
OC.MimeTypeList.themes.abc = ['folder'];
});
afterEach(function() {
OC.MimeTypeList.files = _files;
OC.MimeTypeList.aliases = _aliases;
OC.MimeTypeList.themes['abc'] = _theme;
OC.MimeTypeList.themes.abc = _theme;
});
describe('_getFile', function() {
@ -109,9 +109,9 @@ describe('MimeType tests', function() {
var res = OC.MimeType.getIconUrl('dir');
expect(Object.keys(OC.MimeType._mimeTypeIcons).length).toEqual(1);
expect(OC.MimeType._mimeTypeIcons['dir']).toEqual(res);
expect(OC.MimeType._mimeTypeIcons.dir).toEqual(res);
var res = OC.MimeType.getIconUrl('dir-shared');
res = OC.MimeType.getIconUrl('dir-shared');
expect(Object.keys(OC.MimeType._mimeTypeIcons).length).toEqual(2);
expect(OC.MimeType._mimeTypeIcons['dir-shared']).toEqual(res);
});

@ -48,7 +48,6 @@ describe('OC.Share.ShareDialogLinkShareView', function () {
configModel = new OC.Share.ShareConfigModel({
enforcePasswordForPublicLink: false,
isResharingAllowed: true,
enforcePasswordForPublicLink: false,
isDefaultExpireDateEnabled: false,
isDefaultExpireDateEnforced: false,
defaultExpireDate: 7

@ -59,7 +59,6 @@ describe('OC.Share.ShareDialogShareeListView', function () {
configModel = new OC.Share.ShareConfigModel({
enforcePasswordForPublicLink: false,
isResharingAllowed: true,
enforcePasswordForPublicLink: false,
isDefaultExpireDateEnabled: false,
isDefaultExpireDateEnforced: false,
defaultExpireDate: 7

@ -67,7 +67,6 @@ describe('OC.Share.ShareDialogView', function() {
configModel = new OC.Share.ShareConfigModel({
enforcePasswordForPublicLink: false,
isResharingAllowed: true,
enforcePasswordForPublicLink: false,
isDefaultExpireDateEnabled: false,
isDefaultExpireDateEnforced: false,
defaultExpireDate: 7

Loading…
Cancel
Save