From 31d0dbb48f934aa50892528b946e50fe2a63d26d Mon Sep 17 00:00:00 2001 From: ehmicky Date: Fri, 16 Oct 2020 15:00:41 +0200 Subject: [PATCH] chore(lint): add `default-param-last` ESLint rule --- .eslintrc.js | 1 + src/commands/functions/create.js | 2 +- src/utils/proxy.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 516dd91f76d..bba486c1a2f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -27,6 +27,7 @@ module.exports = { 'consistent-this': 2, 'default-case': 2, 'default-case-last': 2, + 'default-param-last': 2, 'func-name-matching': [2, { considerPropertyDescriptor: true }], 'func-names': [2, 'as-needed'], 'max-classes-per-file': 2, diff --git a/src/commands/functions/create.js b/src/commands/functions/create.js index a203b7e3843..046e4e29e17 100644 --- a/src/commands/functions/create.js +++ b/src/commands/functions/create.js @@ -358,7 +358,7 @@ async function createFunctionAddon({ api, addons, siteId, addonName, siteData, l } } -async function installAddons(context, functionAddons = [], fnPath) { +async function installAddons(context, functionAddons, fnPath) { if (functionAddons.length === 0) { return } diff --git a/src/utils/proxy.js b/src/utils/proxy.js index 9be8e0a97d5..ee4257dedcd 100644 --- a/src/utils/proxy.js +++ b/src/utils/proxy.js @@ -298,7 +298,7 @@ function initializeProxy(port, distDir, projectDir) { return handlers } -async function startProxy(settings = {}, addonUrls, configPath, projectDir) { +async function startProxy(settings, addonUrls, configPath, projectDir) { const functionsServer = settings.functionsPort ? `http://localhost:${settings.functionsPort}` : null const proxy = initializeProxy(settings.frameworkPort, settings.dist, projectDir)