From caa293647c8caa67af3f1461683ecee3efbac544 Mon Sep 17 00:00:00 2001 From: Keiko Oda Date: Sun, 6 Dec 2020 18:29:31 -0800 Subject: [PATCH] feat(lm): fix lint --- src/commands/lm/index.js | 6 +++--- src/commands/lm/info.js | 2 +- src/utils/lm/requirements.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/commands/lm/index.js b/src/commands/lm/index.js index 112bfda9c58..97397a8aa0d 100644 --- a/src/commands/lm/index.js +++ b/src/commands/lm/index.js @@ -1,6 +1,6 @@ const { Command } = require('@oclif/command') -const showHelp = require('../../utils/show-help') const { isEmptyCommand } = require('../../utils/check-command-inputs') +const showHelp = require('../../utils/show-help') class LmCommand extends Command { async run() { @@ -19,8 +19,8 @@ The lm command will help you manage a large media for the site ` LmCommand.examples = [ 'netlify lm:info', -// 'netlify lm:install', -// 'netlify lm:setup' + // 'netlify lm:install', + // 'netlify lm:setup' ] LmCommand.hidden = true diff --git a/src/commands/lm/info.js b/src/commands/lm/info.js index 3e5a1d8962f..555d98cb84f 100644 --- a/src/commands/lm/info.js +++ b/src/commands/lm/info.js @@ -1,6 +1,6 @@ const { Command } = require('@oclif/command') -const Listr = require('listr') const chalk = require('chalk') +const Listr = require('listr') const { GitValidators, checkLFSFilters, diff --git a/src/utils/lm/requirements.js b/src/utils/lm/requirements.js index 954ce366ebf..30fceaedd9c 100644 --- a/src/utils/lm/requirements.js +++ b/src/utils/lm/requirements.js @@ -49,7 +49,7 @@ async function checkGitVersion() { async function checkLFSVersion() { try { const result = await execa('git-lfs', ['--version']) - return matchVersion(result.stdout, /git-lfs\/([\.\d]+).*/, '2.5.1', 'Invalid Git LFS version. Please update to version 2.5.1 or above') + return matchVersion(result.stdout, /git-lfs\/([.\d]+).*/, '2.5.1', 'Invalid Git LFS version. Please update to version 2.5.1 or above') } catch (error) { throw new Error('Check that Git LFS is installed in your system') } @@ -57,7 +57,7 @@ async function checkLFSVersion() { function matchVersion(out, regex, version, message) { const match = out.match(regex) - if (!match || match.length != 2 || semver.lt(match[1], version)) { + if (!match || match.length !== 2 || semver.lt(match[1], version)) { throw new Error(message) } return match[1]