Reduce JSHint errors/warnings
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
576d31d48d
commit
d790c27a19
9 changed files with 15 additions and 15 deletions
|
@ -28,7 +28,10 @@
|
||||||
"_": true,
|
"_": true,
|
||||||
"OC": true,
|
"OC": true,
|
||||||
"OCA": true,
|
"OCA": true,
|
||||||
|
"OCP": true,
|
||||||
"t": true,
|
"t": true,
|
||||||
"n": true
|
"n": true,
|
||||||
|
"escapeHTML": true,
|
||||||
|
"Promise": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1512,7 +1512,7 @@ function initCore() {
|
||||||
|
|
||||||
var resizeMenu = function() {
|
var resizeMenu = function() {
|
||||||
var appList = $('#appmenu li');
|
var appList = $('#appmenu li');
|
||||||
var headerWidth = $('.header-left').width() - $('#nextcloud').width()
|
var headerWidth = $('.header-left').width() - $('#nextcloud').width();
|
||||||
var usePercentualAppMenuLimit = 0.33;
|
var usePercentualAppMenuLimit = 0.33;
|
||||||
var minAppsDesktop = 8;
|
var minAppsDesktop = 8;
|
||||||
var availableWidth = headerWidth - $(appList).width();
|
var availableWidth = headerWidth - $(appList).width();
|
||||||
|
|
|
@ -256,10 +256,10 @@ describe('Core base tests', function() {
|
||||||
describe('filePath', function() {
|
describe('filePath', function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
OC.webroot = 'http://localhost';
|
OC.webroot = 'http://localhost';
|
||||||
OC.appswebroots['files'] = OC.webroot + '/apps3/files';
|
OC.appswebroots.files = OC.webroot + '/apps3/files';
|
||||||
});
|
});
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
delete OC.appswebroots['files'];
|
delete OC.appswebroots.files;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Uses a direct link for css and images,' , function() {
|
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);
|
expect(info.id).toEqual(11);
|
||||||
|
|
||||||
// file entry
|
// file entry
|
||||||
var info = response[1];
|
info = response[1];
|
||||||
expect(info instanceof OC.Files.FileInfo).toEqual(true);
|
expect(info instanceof OC.Files.FileInfo).toEqual(true);
|
||||||
expect(info.id).toEqual(51);
|
expect(info.id).toEqual(51);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
describe('jquery.avatar tests', function() {
|
describe('jquery.avatar tests', function() {
|
||||||
|
|
||||||
var $div;
|
var $div;
|
||||||
var devicePixelRatio
|
var devicePixelRatio;
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
$('#testArea').append($('<div id="avatardiv">'));
|
$('#testArea').append($('<div id="avatardiv">'));
|
||||||
|
@ -24,7 +24,7 @@ describe('jquery.avatar tests', function() {
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
$div.remove();
|
$div.remove();
|
||||||
|
|
||||||
window.devicePixelRatio = devicePixelRatio
|
window.devicePixelRatio = devicePixelRatio;
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('size', function() {
|
describe('size', function() {
|
||||||
|
|
|
@ -26,17 +26,17 @@ describe('MimeType tests', function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
_files = OC.MimeTypeList.files;
|
_files = OC.MimeTypeList.files;
|
||||||
_aliases = OC.MimeTypeList.aliases;
|
_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.files = ['folder', 'folder-shared', 'folder-external', 'foo-bar', 'foo', 'file'];
|
||||||
OC.MimeTypeList.aliases = {'app/foobar': 'foo/bar'};
|
OC.MimeTypeList.aliases = {'app/foobar': 'foo/bar'};
|
||||||
OC.MimeTypeList.themes['abc'] = ['folder'];
|
OC.MimeTypeList.themes.abc = ['folder'];
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
OC.MimeTypeList.files = _files;
|
OC.MimeTypeList.files = _files;
|
||||||
OC.MimeTypeList.aliases = _aliases;
|
OC.MimeTypeList.aliases = _aliases;
|
||||||
OC.MimeTypeList.themes['abc'] = _theme;
|
OC.MimeTypeList.themes.abc = _theme;
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('_getFile', function() {
|
describe('_getFile', function() {
|
||||||
|
@ -109,9 +109,9 @@ describe('MimeType tests', function() {
|
||||||
|
|
||||||
var res = OC.MimeType.getIconUrl('dir');
|
var res = OC.MimeType.getIconUrl('dir');
|
||||||
expect(Object.keys(OC.MimeType._mimeTypeIcons).length).toEqual(1);
|
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(Object.keys(OC.MimeType._mimeTypeIcons).length).toEqual(2);
|
||||||
expect(OC.MimeType._mimeTypeIcons['dir-shared']).toEqual(res);
|
expect(OC.MimeType._mimeTypeIcons['dir-shared']).toEqual(res);
|
||||||
});
|
});
|
||||||
|
|
|
@ -48,7 +48,6 @@ describe('OC.Share.ShareDialogLinkShareView', function () {
|
||||||
configModel = new OC.Share.ShareConfigModel({
|
configModel = new OC.Share.ShareConfigModel({
|
||||||
enforcePasswordForPublicLink: false,
|
enforcePasswordForPublicLink: false,
|
||||||
isResharingAllowed: true,
|
isResharingAllowed: true,
|
||||||
enforcePasswordForPublicLink: false,
|
|
||||||
isDefaultExpireDateEnabled: false,
|
isDefaultExpireDateEnabled: false,
|
||||||
isDefaultExpireDateEnforced: false,
|
isDefaultExpireDateEnforced: false,
|
||||||
defaultExpireDate: 7
|
defaultExpireDate: 7
|
||||||
|
|
|
@ -59,7 +59,6 @@ describe('OC.Share.ShareDialogShareeListView', function () {
|
||||||
configModel = new OC.Share.ShareConfigModel({
|
configModel = new OC.Share.ShareConfigModel({
|
||||||
enforcePasswordForPublicLink: false,
|
enforcePasswordForPublicLink: false,
|
||||||
isResharingAllowed: true,
|
isResharingAllowed: true,
|
||||||
enforcePasswordForPublicLink: false,
|
|
||||||
isDefaultExpireDateEnabled: false,
|
isDefaultExpireDateEnabled: false,
|
||||||
isDefaultExpireDateEnforced: false,
|
isDefaultExpireDateEnforced: false,
|
||||||
defaultExpireDate: 7
|
defaultExpireDate: 7
|
||||||
|
|
|
@ -67,7 +67,6 @@ describe('OC.Share.ShareDialogView', function() {
|
||||||
configModel = new OC.Share.ShareConfigModel({
|
configModel = new OC.Share.ShareConfigModel({
|
||||||
enforcePasswordForPublicLink: false,
|
enforcePasswordForPublicLink: false,
|
||||||
isResharingAllowed: true,
|
isResharingAllowed: true,
|
||||||
enforcePasswordForPublicLink: false,
|
|
||||||
isDefaultExpireDateEnabled: false,
|
isDefaultExpireDateEnabled: false,
|
||||||
isDefaultExpireDateEnforced: false,
|
isDefaultExpireDateEnforced: false,
|
||||||
defaultExpireDate: 7
|
defaultExpireDate: 7
|
||||||
|
|
Loading…
Reference in a new issue