From 68bd6354655c67b1c8f724625dae5045f13c1539 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Wed, 6 Feb 2019 00:38:35 +0100 Subject: [PATCH] fix: linter --- bin/cli/help.js | 12 +++++------- bin/cli/log.js | 4 +--- bin/serve/listen-message.js | 4 +--- bin/serve/listen.js | 10 +--------- bin/watch/index.js | 13 ++----------- package.json | 6 ++++-- 6 files changed, 14 insertions(+), 35 deletions(-) diff --git a/bin/cli/help.js b/bin/cli/help.js index f69b53c..3c06240 100644 --- a/bin/cli/help.js +++ b/bin/cli/help.js @@ -11,19 +11,17 @@ module.exports = ` -p, --port Port to listen on ${chalk.gray('[default=3000]')} - -H, --host The host on which svr will run ${chalk.gray( - "[default='localhost']" - )} + -H, --host The host on which svr will run ${chalk.gray("[default='localhost']")} -d, --pwd A directory to start ${chalk.gray('[default=cwd]')} -L, --poll Poll for code changes rather than using events ${chalk.gray( - '[default=false]' - )} + '[default=false]' + )} -i, --ignore Ignore watching a file, directory, or glob ${chalk.gray( - '[default=.gitignore, pkg.ignore]' - )} + '[default=.gitignore, pkg.ignore]' + )} -w, --watch Add more files than the project path to watch diff --git a/bin/cli/log.js b/bin/cli/log.js index f027ac6..b437a10 100644 --- a/bin/cli/log.js +++ b/bin/cli/log.js @@ -67,9 +67,7 @@ module.exports = { let done = false const timer = setInterval(() => { - done - ? logUpdate(`${logMessage}`) - : logUpdate(`${logMessage} ${spinner.frame()}`) + done ? logUpdate(`${logMessage}`) : logUpdate(`${logMessage} ${spinner.frame()}`) }, 50) return { diff --git a/bin/serve/listen-message.js b/bin/serve/listen-message.js index 99e99f6..ca1527c 100644 --- a/bin/serve/listen-message.js +++ b/bin/serve/listen-message.js @@ -16,9 +16,7 @@ module.exports = ({ appName, port, inUse, userPort }) => { let message = chalk.green(`${appName} is running!`) if (inUse) { - message += chalk.red( - `\n(on port ${port}, because ${userPort} is already in use)` - ) + message += chalk.red(`\n(on port ${port}, because ${userPort} is already in use)`) } message += '\n\n' diff --git a/bin/serve/listen.js b/bin/serve/listen.js index ee88c91..695ec13 100644 --- a/bin/serve/listen.js +++ b/bin/serve/listen.js @@ -5,15 +5,7 @@ const importCwd = require('import-cwd') const { error: logError } = require('../cli/log') const listenMessage = require('./listen-message') -module.exports = async ({ - userPort, - inUse, - pkg, - port, - host, - restarting, - filepath -}) => { +module.exports = async ({ userPort, inUse, pkg, port, host, restarting, filepath }) => { let server try { diff --git a/bin/watch/index.js b/bin/watch/index.js index f419f24..d7341f4 100644 --- a/bin/watch/index.js +++ b/bin/watch/index.js @@ -51,15 +51,7 @@ const doRestart = ({ ) } -module.exports = ({ - filepath, - watchFiles, - pwd, - pkg, - server, - sockets, - ...opts -}) => { +module.exports = ({ filepath, watchFiles, pwd, pkg, server, sockets, ...opts }) => { const watchConfig = getWatchConfig({ pwd, pkg, @@ -87,8 +79,7 @@ module.exports = ({ watcher.once( 'all', debounce( - (event, filename) => - restart({ forcing: false, filename: path.relative(pwd, filename) }), + (event, filename) => restart({ forcing: false, filename: path.relative(pwd, filename) }), 10 ) ) diff --git a/package.json b/package.json index d9a922d..8d808eb 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,10 @@ "url": "https://github.com/Kikobeats" }, "contributors": [ - "Kiko Beats " + { + "name": "Kiko Beats", + "email": "josefrancisco.verdu@gmail.com" + } ], "repository": { "type": "git", @@ -104,7 +107,6 @@ "precommit": "lint-staged", "prelint": "npm run pretty", "prerelease": "npm run update:check && git-authors-cli", - "pretest": "npm run lint", "pretty": "prettier-standard {core,test,bin}/**/*.js", "release": "git add package.json && standard-version -a", "release:github": "conventional-github-releaser -p angular",