mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
chore(cloudcmd) lint
This commit is contained in:
parent
f92152195c
commit
fbc8ae25ad
5 changed files with 8 additions and 10 deletions
|
|
@ -22,10 +22,9 @@
|
|||
"remove-process-exit": "on"
|
||||
},
|
||||
"server/{server,exit}.js": {
|
||||
"remove-process-exit": "off",
|
||||
"remove-console": "off"
|
||||
"remove-process-exit": "off"
|
||||
},
|
||||
"server/{terminal,distribute/log}.js": {
|
||||
"server/{server,exit,terminal,distribute/log}.js": {
|
||||
"remove-console": "off"
|
||||
},
|
||||
"client/{client,cloudcmd,load-module}.js": {
|
||||
|
|
@ -36,9 +35,7 @@
|
|||
},
|
||||
"storage.js": {
|
||||
"remove-useless-async": "off"
|
||||
}
|
||||
},
|
||||
"match": {
|
||||
},
|
||||
"docker.yml": {
|
||||
"github/set-node-versions": "off"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ module.exports.setCurrentFile = (currentFile, options) => {
|
|||
* but it should be false
|
||||
* to prevent default behavior
|
||||
*/
|
||||
if (!o || o.history !== false) {
|
||||
if (!o || o.history) {
|
||||
const historyPath = path === '/' ? path : FS + path;
|
||||
DOM.setHistory(historyPath, null, historyPath);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@ async function switchKey(event) {
|
|||
Operation.show('extract');
|
||||
else
|
||||
CloudCmd.Menu.show();
|
||||
|
||||
event.preventDefault();
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ async function show(data, options = {}) {
|
|||
if (Loading)
|
||||
return;
|
||||
|
||||
if (!options || options.bindKeys !== false)
|
||||
if (!options || options.bindKeys)
|
||||
Events.addKey(listener);
|
||||
|
||||
El = createElement('div', {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ test('env: big', (t) => {
|
|||
|
||||
test('env: bool: false', (t) => {
|
||||
process.env.cloudcmd_terminal = 'false';
|
||||
t.equal(env.bool('terminal'), false, 'should return false');
|
||||
t.notOk(env.bool('terminal'), 'should return false');
|
||||
|
||||
delete process.env.cloudcmd_terminal;
|
||||
t.end();
|
||||
|
|
@ -30,7 +30,7 @@ test('env: bool: false', (t) => {
|
|||
test('env: bool: true', (t) => {
|
||||
process.env.cloudcmd_terminal = 'true';
|
||||
|
||||
t.equal(env.bool('terminal'), true, 'should be true');
|
||||
t.ok(env.bool('terminal'), 'should be true');
|
||||
|
||||
delete process.env.cloudcmd_terminal;
|
||||
t.end();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue