chore: cloudcmd: actions: lint ☘️

This commit is contained in:
coderaiser 2026-03-17 18:45:13 +00:00
parent c9b27bb514
commit 170b4da211
7 changed files with 19 additions and 3 deletions

View file

@ -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'),

View file

@ -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();

View file

@ -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',

View file

@ -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: [],

View file

@ -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) {

View file

@ -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,

View file

@ -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,