mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 08:56:20 +00:00
chore: cloudcmd: actions: lint ☘️
This commit is contained in:
parent
c9b27bb514
commit
170b4da211
7 changed files with 19 additions and 3 deletions
|
|
@ -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'),
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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: [],
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue