chore(cloudcmd) lint using actions

This commit is contained in:
coderaiser 2022-06-02 09:55:39 +00:00
parent ed0c2ad45a
commit 3d4ba373a6
20 changed files with 77 additions and 39 deletions

View file

@ -1,8 +1,10 @@
'use strict';
const test = require('supertape');
const {
test,
stub,
} = require('supertape');
const {create} = require('auto-globals');
const stub = require('@cloudcmd/stub');
const id = (a) => a;
const wraptile = require('wraptile');
const returns = wraptile(id);

View file

@ -304,7 +304,7 @@ module.exports.getCurrentData = async (currentFile) => {
if (e)
return [e, null];
const ONE_MEGABYTE = 1024 * 1024 * 1024;
const ONE_MEGABYTE = 1024 ** 2 * 1024;
const {length} = data;
if (hash && length < ONE_MEGABYTE)

View file

@ -1,7 +1,9 @@
'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const mockRequire = require('mock-require');
const {reRequire, stopAll} = mockRequire;

View file

@ -1,7 +1,9 @@
'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const mockRequire = require('mock-require');
const {reRequire, stopAll} = mockRequire;

View file

@ -1,7 +1,9 @@
'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const storage = require('./storage');
const {stringify} = JSON;

View file

@ -2,8 +2,10 @@
const {join} = require('path');
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const mockRequire = require('mock-require');
const {reRequire, stopAll} = mockRequire;

View file

@ -1,7 +1,9 @@
'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const vim = require('./vim');

View file

@ -1,8 +1,10 @@
'use strict';
const test = require('supertape');
const {
test,
stub,
} = require('supertape');
const mockRequire = require('mock-require');
const stub = require('@cloudcmd/stub');
const {stopAll} = mockRequire;

View file

@ -1,7 +1,9 @@
'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const parse = require('./parse-user-menu');
test('cloudcmd: user menu: parse', (t) => {

View file

@ -1,7 +1,9 @@
'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const {runSelected} = require('./run');
test('cloudcmd: client: user menu: run', async (t) => {

View file

@ -1,7 +1,9 @@
'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const {btoa, atob} = require('./base64');

View file

@ -2,8 +2,10 @@
const path = require('path');
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const {reRequire} = require('mock-require');
const DIR = './';

View file

@ -1,7 +1,9 @@
'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const root = '../';
const configPath = './config';

View file

@ -1,8 +1,10 @@
'use strict';
const test = require('supertape');
const {
test,
stub,
} = require('supertape');
const exit = require('./exit');
const stub = require('@cloudcmd/stub');
test('cloudcmd: exit: process.exit', (t) => {
const {exit: exitOriginal} = process;

View file

@ -1,8 +1,10 @@
'use strict';
const test = require('supertape');
const {
test,
stub,
} = require('supertape');
const info = require('./info');
const stub = require('@cloudcmd/stub');
test('cloudcmd: rest: info', (t) => {
const {memoryUsage} = process;

View file

@ -1,7 +1,9 @@
'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const mockRequire = require('mock-require');
const {reRequire, stopAll} = mockRequire;

View file

@ -1,7 +1,9 @@
'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const mockRequire = require('mock-require');

View file

@ -3,10 +3,12 @@
const fs = require('fs');
const {join} = require('path');
const test = require('supertape');
const {
test,
stub,
} = require('supertape');
const serveOnce = require('serve-once');
const threadIt = require('thread-it');
const stub = require('@cloudcmd/stub');
const {reRequire} = require('mock-require');
const userMenu = require('./user-menu');

View file

@ -2,8 +2,10 @@
const fs = require('fs');
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const tryCatch = require('try-catch');
const mockRequire = require('mock-require');
const {reRequire, stopAll} = mockRequire;

View file

@ -1,8 +1,10 @@
'use strict';
const {join} = require('path');
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const {
test,
stub,
} = require('supertape');
const cloudcmdPath = join(__dirname, '..', '..');
const modulesPath = join(cloudcmdPath, 'json', 'modules.json');