diff --git a/.madrun.js b/.madrun.js index ffcee54e..b10c47ac 100644 --- a/.madrun.js +++ b/.madrun.js @@ -16,7 +16,10 @@ export default { NODE_ENV: 'development', }), 'build:start': () => run(['build:client', 'start']), - 'build:start:dev': () => run(['build:client:dev', 'start:dev']), + 'build:start:dev': () => run([ + 'build:client:dev', + 'start:dev', + ]), 'lint:all': () => run('lint:progress'), 'lint': () => 'redlint fix; putout . --rulesdir rules', 'lint:progress': () => run('lint', '-f progress'), diff --git a/client/dom/current-file.js b/client/dom/current-file.js index 339376d2..b8113054 100644 --- a/client/dom/current-file.js +++ b/client/dom/current-file.js @@ -302,6 +302,7 @@ export const isCurrentIsDir = (currentFile) => { export const getCurrentType = (currentFile) => { const current = currentFile || DOM.getCurrentFile(); const el = DOM.getByDataName('js-type', current); + const type = el.className .split(' ') .pop(); diff --git a/client/key/index.spec.js b/client/key/index.spec.js index 62fbff4d..bec92b31 100644 --- a/client/key/index.spec.js +++ b/client/key/index.spec.js @@ -37,6 +37,7 @@ test('cloudcmd: client: key: enable vim', async (t) => { test('cloudcmd: client: key: disable vim', async (t) => { const _config = stub(); const config = stub(); + const event = { keyCode: ESC, key: 'Escape', diff --git a/client/key/vim/index.spec.js b/client/key/vim/index.spec.js index f187dea2..b31e3d60 100644 --- a/client/key/vim/index.spec.js +++ b/client/key/vim/index.spec.js @@ -447,6 +447,7 @@ test('cloudcmd: client: key: set first file current: ^', async (t) => { test('cloudcmd: client: key: visual', (t) => { const element = {}; const toggleSelectedFile = stub(); + const Info = { element, }; @@ -463,6 +464,7 @@ test('cloudcmd: client: key: visual', (t) => { test('cloudcmd: client: key: ESC', (t) => { const element = {}; const unselectFiles = stub(); + const Info = { element, }; @@ -508,6 +510,7 @@ test('cloudcmd: client: key: Enter', async (t) => { test('cloudcmd: client: key: /', (t) => { const preventDefault = stub(); const element = {}; + const Info = { element, files: [], diff --git a/client/listeners/index.js b/client/listeners/index.js index 117a6a40..babc1e0d 100644 --- a/client/listeners/index.js +++ b/client/listeners/index.js @@ -55,6 +55,7 @@ let EXT; function header() { const fm = DOM.getFM(); const isDataset = (el) => el.dataset; + const isPanel = (el) => { return /^js-(left|right)$/.test(el.dataset.name); }; @@ -309,8 +310,12 @@ function onDragStart(event) { link.href = prefixURL + '/pack' + Info.path + EXT; } - event.dataTransfer.setData('DownloadURL', 'application/octet-stream' + ':' + name + - ':' + link); + event.dataTransfer.setData( + 'DownloadURL', + 'application/octet-stream' + ':' + name + + ':' + + link, + ); } function getLIElement(element) { diff --git a/client/modules/user-menu/parse-user-menu.spec.js b/client/modules/user-menu/parse-user-menu.spec.js index 0a9dc02c..fb763209 100644 --- a/client/modules/user-menu/parse-user-menu.spec.js +++ b/client/modules/user-menu/parse-user-menu.spec.js @@ -4,6 +4,7 @@ import {parseUserMenu} from './parse-user-menu.js'; test('cloudcmd: user menu: parse', (t) => { const fn = stub(); const __settings = {}; + const result = parseUserMenu({ __settings, 'F2 - Rename file': fn, diff --git a/server/markdown/index.spec.js b/server/markdown/index.spec.js index 5a337bd9..466271bd 100644 --- a/server/markdown/index.spec.js +++ b/server/markdown/index.spec.js @@ -90,6 +90,7 @@ test('cloudcmd: markdown: no request', async (t) => { test('cloudcmd: markdown', async (t) => { const configManager = cloudcmd.createConfigManager(); const fixtureDir = new URL('fixture', import.meta.url).pathname; + const config = { auth: false, root: fixtureDir, @@ -109,6 +110,7 @@ test('cloudcmd: markdown', async (t) => { test('cloudcmd: markdown: zip', async (t) => { const configManager = cloudcmd.createConfigManager(); const fixtureDir = new URL('fixture', import.meta.url).pathname; + const config = { auth: false, root: fixtureDir,