mirror of
https://github.com/onyx-and-iris/meld-cli.git
synced 2025-07-12 02:11:46 +00:00
lint fixes
This commit is contained in:
parent
4f401a750a
commit
008989dc83
5
index.js
5
index.js
@ -23,7 +23,7 @@ const socket = new WebSocket(`ws://${address}:${port}`)
|
|||||||
* Print help information.
|
* Print help information.
|
||||||
* @param {string} helpText
|
* @param {string} helpText
|
||||||
*/
|
*/
|
||||||
function printHelp(helpText) {
|
function printHelp (helpText) {
|
||||||
console.log(helpText)
|
console.log(helpText)
|
||||||
process.exit(0)
|
process.exit(0)
|
||||||
}
|
}
|
||||||
@ -33,7 +33,8 @@ function printHelp(helpText) {
|
|||||||
* @param {WebSocket} socket - The websocket instance.
|
* @param {WebSocket} socket - The websocket instance.
|
||||||
* @param {function} fn - The function to execute with the channel.
|
* @param {function} fn - The function to execute with the channel.
|
||||||
*/
|
*/
|
||||||
function withChannel(socket, fn) {
|
function withChannel (socket, fn) {
|
||||||
|
// eslint-disable-next-line no-new
|
||||||
new QWebChannel(socket, function (channel) {
|
new QWebChannel(socket, function (channel) {
|
||||||
fn(channel)
|
fn(channel)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
|
@ -18,13 +18,9 @@ const clipHelp = meowHelp({
|
|||||||
defaults: false
|
defaults: false
|
||||||
})
|
})
|
||||||
|
|
||||||
async function saveClip(channel) {
|
async function saveClip (channel) {
|
||||||
try {
|
await channel.objects.meld.sendCommand('meld.recordClip')
|
||||||
await channel.objects.meld.sendCommand('meld.recordClip');
|
return 'Clip command sent successfully.'
|
||||||
return 'Clip command sent successfully.';
|
|
||||||
} catch (err) {
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { clipHelp, saveClip }
|
export { clipHelp, saveClip }
|
||||||
|
@ -18,13 +18,9 @@ const screenshotHelp = meowHelp({
|
|||||||
defaults: false
|
defaults: false
|
||||||
})
|
})
|
||||||
|
|
||||||
async function takeScreenshot(channel) {
|
async function takeScreenshot (channel) {
|
||||||
try {
|
await channel.objects.meld.sendCommand('meld.screenshot')
|
||||||
await channel.objects.meld.sendCommand('meld.screenshot');
|
return 'Screenshot command sent successfully.'
|
||||||
return 'Screenshot command sent successfully.';
|
|
||||||
} catch (err) {
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { screenshotHelp, takeScreenshot }
|
export { screenshotHelp, takeScreenshot }
|
Loading…
x
Reference in New Issue
Block a user