chore: lint

This commit is contained in:
coderiaser 2025-07-02 20:10:47 +03:00
parent 1679b788c2
commit 5f0391fc44
7 changed files with 30 additions and 32 deletions

View file

@ -6,9 +6,6 @@
"app.json",
"fontello.json"
],
"rules": {
"github/set-node-versions": "off"
},
"match": {
"base64": {
"types/convert-typeof-to-is-type": "off"

View file

@ -318,9 +318,10 @@ async function readConfig(name) {
async function help() {
const {default: bin} = await import('../json/help.json', {
with: {
type: 'json'
}
type: 'json',
},
});
const forEachKey = await simport('for-each-key');
const currify = await simport('currify');

View file

@ -29,8 +29,9 @@ const getOperations = (event, deps) => {
setCurrentFile,
setCurrentByName,
getCurrentName,
toggleSelectedFile,
Buffer = {},
Buffer = {},
} = deps;
return {

View file

@ -59,19 +59,19 @@ module.exports.init = promisify((callback) => {
exec.series([
DOM.loadSocket,
async (callback) => {
if (config('dropbox'))
return callback();
const {prefix, prefixSocket} = CloudCmd;
await loadAll();
await initOperations(prefix, prefixSocket, callback);
},
if (config('dropbox'))
return callback();
const {prefix, prefixSocket} = CloudCmd;
await loadAll();
await initOperations(prefix, prefixSocket, callback);
},
(callback) => {
Loaded = true;
Images.hide();
callback();
},
Loaded = true;
Images.hide();
callback();
},
], callback);
});

View file

@ -6,16 +6,16 @@ const {btoa, atob} = require('./base64');
test('btoa: browser', (t) => {
const btoaOriginal = global.btoa;
const btoaStub = stub();
const str = 'hello';
global.btoa = stub();
global.btoa = btoaStub;
btoa(str);
t.calledWith(global.btoa, [str], 'should call global.btoa');
t.end();
global.btoa = btoaOriginal;
t.calledWith(btoaStub, [str], 'should call global.btoa');
t.end();
});
test('btoa: node', (t) => {
@ -30,16 +30,18 @@ test('btoa: node', (t) => {
test('atob: browser', (t) => {
const atobOriginal = global.atob;
const atobStub = stub();
const str = 'hello';
global.atob = stub();
global.atob = atobStub;
atob(str);
t.calledWith(global.atob, [str], 'should call global.btoa');
t.end();
global.atob = atobOriginal;
t.calledWith(atobStub, [str], 'should call global.btoa');
t.end();
});
test('atob: node', (t) => {

View file

@ -1,6 +1,5 @@
'use strict';
const {join} = require('node:path');
const {callbackify} = require('node:util');
const pullout = require('pullout');
@ -8,8 +7,9 @@ const ponse = require('ponse');
const {read} = require('redzip');
const root = require('../root');
const isString = (a) => typeof a === 'string';
const parse = require('./worker');
const isString = (a) => typeof a === 'string';
// warm up
parse('');

View file

@ -1,4 +1,3 @@
import {createRequire} from 'node:module';
import {homedir} from 'node:os';
import {readFile as _readFile} from 'node:fs/promises';
import {join} from 'node:path';
@ -7,8 +6,6 @@ import tryToCatch from 'try-to-catch';
import currify from 'currify';
import {putout, codeframe} from 'putout';
const require = createRequire(import.meta.url);
// warm up worker cache
transpile('');