Skip to content

Commit 5f0391f

Browse files
committed
chore: lint
1 parent 1679b78 commit 5f0391f

File tree

7 files changed

+29
-31
lines changed

7 files changed

+29
-31
lines changed

.putout.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
"app.json",
77
"fontello.json"
88
],
9-
"rules": {
10-
"github/set-node-versions": "off"
11-
},
129
"match": {
1310
"base64": {
1411
"types/convert-typeof-to-is-type": "off"

bin/cloudcmd.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,10 @@ async function readConfig(name) {
318318
async function help() {
319319
const {default: bin} = await import('../json/help.json', {
320320
with: {
321-
type: 'json'
322-
}
321+
type: 'json',
322+
},
323323
});
324+
324325
const forEachKey = await simport('for-each-key');
325326
const currify = await simport('currify');
326327

client/key/vim/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ const getOperations = (event, deps) => {
2929
setCurrentFile,
3030
setCurrentByName,
3131
getCurrentName,
32+
3233
toggleSelectedFile,
33-
Buffer = {},
34+
Buffer = {},
3435
} = deps;
3536

3637
return {

client/modules/operation/index.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@ module.exports.init = promisify((callback) => {
5959
exec.series([
6060
DOM.loadSocket,
6161
async (callback) => {
62-
if (config('dropbox'))
63-
return callback();
64-
65-
const {prefix, prefixSocket} = CloudCmd;
66-
67-
await loadAll();
68-
await initOperations(prefix, prefixSocket, callback);
69-
},
62+
if (config('dropbox'))
63+
return callback();
64+
65+
const {prefix, prefixSocket} = CloudCmd;
66+
67+
await loadAll();
68+
await initOperations(prefix, prefixSocket, callback);
69+
},
7070
(callback) => {
71-
Loaded = true;
72-
Images.hide();
73-
callback();
74-
},
71+
Loaded = true;
72+
Images.hide();
73+
callback();
74+
},
7575
], callback);
7676
});
7777

common/base64.spec.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ const {btoa, atob} = require('./base64');
66

77
test('btoa: browser', (t) => {
88
const btoaOriginal = global.btoa;
9+
const btoaStub = stub();
910
const str = 'hello';
1011

11-
global.btoa = stub();
12+
global.btoa = btoaStub;
1213

1314
btoa(str);
15+
global.btoa = btoaOriginal;
1416

15-
t.calledWith(global.btoa, [str], 'should call global.btoa');
17+
t.calledWith(btoaStub, [str], 'should call global.btoa');
1618
t.end();
17-
18-
global.btoa = btoaOriginal;
1919
});
2020

2121
test('btoa: node', (t) => {
@@ -30,16 +30,18 @@ test('btoa: node', (t) => {
3030

3131
test('atob: browser', (t) => {
3232
const atobOriginal = global.atob;
33+
const atobStub = stub();
34+
3335
const str = 'hello';
3436

35-
global.atob = stub();
37+
global.atob = atobStub;
3638

3739
atob(str);
3840

39-
t.calledWith(global.atob, [str], 'should call global.btoa');
40-
t.end();
41-
4241
global.atob = atobOriginal;
42+
43+
t.calledWith(atobStub, [str], 'should call global.btoa');
44+
t.end();
4345
});
4446

4547
test('atob: node', (t) => {

server/markdown/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict';
22

3-
const {join} = require('node:path');
43
const {callbackify} = require('node:util');
54

65
const pullout = require('pullout');
76
const ponse = require('ponse');
87
const {read} = require('redzip');
98

109
const root = require('../root');
11-
const isString = (a) => typeof a === 'string';
10+
1211
const parse = require('./worker');
12+
const isString = (a) => typeof a === 'string';
1313

1414
// warm up
1515
parse('');

server/user-menu.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import {createRequire} from 'node:module';
21
import {homedir} from 'node:os';
32
import {readFile as _readFile} from 'node:fs/promises';
43
import {join} from 'node:path';
@@ -7,8 +6,6 @@ import tryToCatch from 'try-to-catch';
76
import currify from 'currify';
87
import {putout, codeframe} from 'putout';
98

10-
const require = createRequire(import.meta.url);
11-
129
// warm up worker cache
1310
transpile('');
1411

0 commit comments

Comments
 (0)