mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
chore: lint
This commit is contained in:
parent
43edba8cb8
commit
cc889bda4f
48 changed files with 64 additions and 62 deletions
|
|
@ -8,7 +8,7 @@ const currify = require('currify');
|
|||
const wraptile = require('wraptile');
|
||||
const squad = require('squad');
|
||||
const {promisify} = require('es6-promisify');
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const {tryToCatch} = require('try-to-catch');
|
||||
const load = require('load.js');
|
||||
const createElement = require('@cloudcmd/create-element');
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
const montag = require('montag');
|
||||
|
||||
const {promisify} = require('es6-promisify');
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const {tryToCatch} = require('try-to-catch');
|
||||
const createElement = require('@cloudcmd/create-element');
|
||||
const load = require('load.js');
|
||||
const {MAX_FILE_SIZE: maxSize} = require('../../common/cloudfunc');
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ CloudCmd.Konsole = exports;
|
|||
|
||||
const exec = require('execon');
|
||||
const currify = require('currify');
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const {tryToCatch} = require('try-to-catch');
|
||||
const loadJS = require('load.js').js;
|
||||
const createElement = require('@cloudcmd/create-element');
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const wraptile = require('wraptile');
|
|||
const {promisify} = require('es6-promisify');
|
||||
const exec = require('execon');
|
||||
const load = require('load.js');
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const {tryToCatch} = require('try-to-catch');
|
||||
|
||||
const {encode} = require('../../../common/entity');
|
||||
const removeExtension = require('./remove-extension');
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ module.exports = (name) => {
|
|||
};
|
||||
|
||||
function getExtension(name) {
|
||||
if (/\.tar\.gz$/.test(name))
|
||||
if (name.endsWith('.tar.gz'))
|
||||
return '.tar.gz';
|
||||
|
||||
if (/\.tar\.bz2$/.test(name))
|
||||
if (name.endsWith('.tar.bz2'))
|
||||
return '.tar.bz2';
|
||||
|
||||
return getExt(name);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/* global CloudCmd, gritty */
|
||||
const {promisify} = require('es6-promisify');
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const {tryToCatch} = require('try-to-catch');
|
||||
const fullstore = require('fullstore');
|
||||
|
||||
require('../../css/terminal.css');
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/* global CloudCmd */
|
||||
/* global gritty */
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const {tryToCatch} = require('try-to-catch');
|
||||
|
||||
require('../../css/terminal.css');
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ const wraptile = require('wraptile');
|
|||
const fullstore = require('fullstore');
|
||||
const load = require('load.js');
|
||||
const createElement = require('@cloudcmd/create-element');
|
||||
const tryCatch = require('try-catch');
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const {tryCatch} = require('try-catch');
|
||||
const {tryToCatch} = require('try-to-catch');
|
||||
const {codeFrameColumns} = require('@babel/code-frame');
|
||||
|
||||
const Images = require('../../dom/images');
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const testRegExp = currify((name, reg) => reg.test(name));
|
|||
const getRegExp = (ext) => RegExp(`\\.${ext}$`, 'i');
|
||||
|
||||
const isPDF = (a) => /\.pdf$/i.test(a);
|
||||
const isHTML = (a) => /\.html$/.test(a);
|
||||
const isHTML = (a) => a.endsWith('.html');
|
||||
const isMarkdown = (a) => /.\.md$/.test(a);
|
||||
|
||||
module.exports = (name) => {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ require('../../../css/view.css');
|
|||
const rendy = require('rendy');
|
||||
const currify = require('currify');
|
||||
const wraptile = require('wraptile');
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const {tryToCatch} = require('try-to-catch');
|
||||
const load = require('load.js');
|
||||
|
||||
const modal = require('@cloudcmd/modal');
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const testRegExp = currify((name, reg) => reg.test(name));
|
|||
const getRegExp = (ext) => RegExp(`\\.${ext}$`, 'i');
|
||||
|
||||
const isPDF = (a) => /\.pdf$/i.test(a);
|
||||
const isHTML = (a) => /\.html$/.test(a);
|
||||
const isHTML = (a) => a.endsWith('.html');
|
||||
const isMarkdown = (a) => /.\.md$/.test(a);
|
||||
|
||||
module.exports.getType = async (path) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue