Repository: netlify/build
Pull request #334 (2019-10-18 14:20:46)

Enforce trailing commas
This enforces trailing commas using ESLint and Prettier.

This is [an article](https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8) on the advantages of using trailing commas.

DavidWells: Do we really need to enforce this?

I'm not a huge fan of overly sensitive linting rules.

Can we just have prettier auto fix but have this not fail lints?

Patch:
diff --git a/.prettierrc.json b/.prettierrc.json
index 6c3f077d6..c35bc1da8 100644
--- a/.prettierrc.json
+++ b/.prettierrc.json
@@ -3,5 +3,6 @@
   "singleQuote": true,
   "printWidth": 120,
   "endOfLine": "lf",
-  "proseWrap": "always"
+  "proseWrap": "always",
+  "trailingComma": "all"
 }
diff --git a/README.md b/README.md
index d7bbc6175..e0ac0b202 100644
--- a/README.md
+++ b/README.md
@@ -180,7 +180,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     init: () => {
       console.log('Do thing on init step')
-    }
+    },
   }
 }
 ```
@@ -224,7 +224,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     getCache: () => {
       console.log('Do thing on getCache step')
-    }
+    },
   }
 }
 ```
@@ -268,7 +268,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     install: () => {
       console.log('Do thing on install step')
-    }
+    },
   }
 }
 ```
@@ -312,7 +312,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     preBuild: () => {
       console.log('Do thing on preBuild step')
-    }
+    },
   }
 }
 ```
@@ -356,7 +356,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     functionsBuild: () => {
       console.log('Do thing on functionsBuild step')
-    }
+    },
   }
 }
 ```
@@ -400,7 +400,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     build: () => {
       console.log('Do thing on build step')
-    }
+    },
   }
 }
 ```
@@ -444,7 +444,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     postBuild: () => {
       console.log('Do thing on postBuild step')
-    }
+    },
   }
 }
 ```
@@ -488,7 +488,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     package: () => {
       console.log('Do thing on package step')
-    }
+    },
   }
 }
 ```
@@ -532,7 +532,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     preDeploy: () => {
       console.log('Do thing on preDeploy step')
-    }
+    },
   }
 }
 ```
@@ -576,7 +576,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     saveCache: () => {
       console.log('Do thing on saveCache step')
-    }
+    },
   }
 }
 ```
@@ -620,7 +620,7 @@ module.exports = function myPlugin(pluginConfig) {
   return {
     finally: () => {
       console.log('Do thing on finally step')
-    }
+    },
   }
 }
 ```
@@ -730,7 +730,7 @@ module.exports = function exampleOne(config) {
     },
     finally: () => {
       console.log('Run custom logic at the end of the build')
-    }
+    },
   }
 }
 ```
diff --git a/examples/backwards-compat/functions/one.js b/examples/backwards-compat/functions/one.js
index dd9db5b3d..fa5e628ff 100644
--- a/examples/backwards-compat/functions/one.js
+++ b/examples/backwards-compat/functions/one.js
@@ -2,7 +2,7 @@ exports.handler = (event, context, callback) => {
   return callback(null, {
     statusCode: 200,
     body: JSON.stringify({
-      hello: 'from function one'
-    })
+      hello: 'from function one',
+    }),
   })
 }
diff --git a/examples/example-one/functions/one.js b/examples/example-one/functions/one.js
index dd9db5b3d..fa5e628ff 100644
--- a/examples/example-one/functions/one.js
+++ b/examples/example-one/functions/one.js
@@ -2,7 +2,7 @@ exports.handler = (event, context, callback) => {
   return callback(null, {
     statusCode: 200,
     body: JSON.stringify({
-      hello: 'from function one'
-    })
+      hello: 'from function one',
+    }),
   })
 }
diff --git a/examples/example-one/plugins/example/index.js b/examples/example-one/plugins/example/index.js
index ee72c1694..3c80317e6 100644
--- a/examples/example-one/plugins/example/index.js
+++ b/examples/example-one/plugins/example/index.js
@@ -30,6 +30,6 @@ module.exports = function netlifyPlugin(config) {
     },
     finally: () => {
       console.log('Hi from finally')
-    }
+    },
   }
 }
diff --git a/examples/example-two/README.md b/examples/example-two/README.md
index 1baa51346..dc0e3f584 100644
--- a/examples/example-two/README.md
+++ b/examples/example-two/README.md
@@ -88,7 +88,7 @@ function exampleNetlifyPlugin(config) {
     // Hook into `postBuild` lifecycle
     postBuild: () => {
       console.log('Build finished. Do custom thing')
-    }
+    },
     // ... etc
   }
 }
diff --git a/examples/example-two/functions/myFuncName.js b/examples/example-two/functions/myFuncName.js
index f893d228b..3b89ab227 100644
--- a/examples/example-two/functions/myFuncName.js
+++ b/examples/example-two/functions/myFuncName.js
@@ -4,7 +4,7 @@ exports.handler = (event, context, callback) => {
   return callback(null, {
     statusCode: 200,
     body: JSON.stringify({
-      hello: 'there'
-    })
+      hello: 'there',
+    }),
   })
 }
diff --git a/examples/example-two/functions/whatever.js b/examples/example-two/functions/whatever.js
index a3ff8751d..7befc7a4d 100644
--- a/examples/example-two/functions/whatever.js
+++ b/examples/example-two/functions/whatever.js
@@ -2,7 +2,7 @@ exports.handler = (event, context, callback) => {
   return callback(null, {
     statusCode: 200,
     body: JSON.stringify({
-      hello: 'hi'
-    })
+      hello: 'hi',
+    }),
   })
 }
diff --git a/examples/example-two/plugins/dynamic/index.js b/examples/example-two/plugins/dynamic/index.js
index 5703d1d6c..c6fed7f2e 100644
--- a/examples/example-two/plugins/dynamic/index.js
+++ b/examples/example-two/plugins/dynamic/index.js
@@ -5,6 +5,6 @@ module.exports = function dynamicPlugin(conf) {
   return {
     [`${hook}`]: () => {
       console.log('do the stuff')
-    }
+    },
   }
 }
diff --git a/examples/example-two/plugins/plugin-one/index.js b/examples/example-two/plugins/plugin-one/index.js
index 2844b5979..bcace940a 100644
--- a/examples/example-two/plugins/plugin-one/index.js
+++ b/examples/example-two/plugins/plugin-one/index.js
@@ -3,6 +3,6 @@ module.exports = function exampleOne(conf) {
   return {
     [`${hook}`]: () => {
       console.log('do the stuff')
-    }
+    },
   }
 }
diff --git a/examples/example-two/plugins/plugin-two/index.js b/examples/example-two/plugins/plugin-two/index.js
index b28d038b7..d997c50f4 100644
--- a/examples/example-two/plugins/plugin-two/index.js
+++ b/examples/example-two/plugins/plugin-two/index.js
@@ -8,6 +8,6 @@ module.exports = function pluginTwo() {
     },
     postBuild: () => {
       console.log('this is run after site build')
-    }
+    },
   }
 }
diff --git a/packages/build/src/cache/index.js b/packages/build/src/cache/index.js
index 4e092d076..dfd500866 100644
--- a/packages/build/src/cache/index.js
+++ b/packages/build/src/cache/index.js
@@ -20,10 +20,10 @@ async function cacheArtifacts(cwd, cacheDir) {
       bower_components: 'bower components',
       node_modules: 'node modules',
       '.venv': 'python virtualenv',
-      wapm_packages: 'wapm packages'
+      wapm_packages: 'wapm packages',
     },
     cwd,
-    cacheDir
+    cacheDir,
   )
 
   const cacheHomeDir = cacheDeps(
@@ -35,10 +35,10 @@ async function cacheArtifacts(cwd, cacheDir) {
       '.m2': 'maven dependencies',
       '.boot': 'boot dependencies',
       '.composer': 'composer dependencies',
-      '.wasmer/cache': 'wasmer cache'
+      '.wasmer/cache': 'wasmer cache',
     },
     HOME,
-    cacheDir
+    cacheDir,
   )
 
   await Promise.all(cacheCwd.concat(cacheHomeDir))
@@ -80,7 +80,7 @@ async function cacheArtifacts(cwd, cacheDir) {
       await moveCache(
         path.join(RVM_DIR, 'rubies', `ruby-${RUBY_VERSION}`),
         path.join(cacheDir, 'ruby_version'),
-        'ruby deps'
+        'ruby deps',
       )
     }
   } else {
diff --git a/packages/build/src/core/bin.js b/packages/build/src/core/bin.js
index 661c845d3..0529abc1f 100755
--- a/packages/build/src/core/bin.js
+++ b/packages/build/src/core/bin.js
@@ -26,29 +26,29 @@ const OPTIONS = {
     string: true,
     describe: `Path to the configuration file.
 Defaults to any netlify.yml, netlify.toml, netlify.json or netlify.js file in
-the current directory or any parent directory`
+the current directory or any parent directory`,
   },
   token: {
     string: true,
     describe: `Netlify API token for authentication.
-The NETLIFY_TOKEN environment variable can be used as well.`
+The NETLIFY_TOKEN environment variable can be used as well.`,
   },
   context: {
     string: true,
     describe: `Build context.
-Default: 'production'`
+Default: 'production'`,
   },
   dry: {
     boolean: true,
     describe: `Run in dry mode, i.e. printing commands without
 executing them.
-Default: false`
+Default: false`,
   },
   verbose: {
     boolean: true,
     describe: `Print messages and errors verbosely.
-Default: false`
-  }
+Default: false`,
+  },
 }
 
 const USAGE = `$0 [OPTIONS...]
diff --git a/packages/build/src/core/config.js b/packages/build/src/core/config.js
index 7878a4716..7c4a55adf 100644
--- a/packages/build/src/core/config.js
+++ b/packages/build/src/core/config.js
@@ -1,6 +1,6 @@
 const { dirname } = require('path')
 const {
-  env: { NETLIFY_TOKEN }
+  env: { NETLIFY_TOKEN },
 } = require('process')
 
 const resolveConfig = require('@netlify/config')
diff --git a/packages/build/src/core/instructions.js b/packages/build/src/core/instructions.js
index 322689b52..37bb1ea94 100644
--- a/packages/build/src/core/instructions.js
+++ b/packages/build/src/core/instructions.js
@@ -24,9 +24,9 @@ const getHookInstructions = function({
   pluginsHooks: { [hook]: pluginHooks = [] },
   config: {
     build: {
-      lifecycle: { [hook]: commands }
-    }
-  }
+      lifecycle: { [hook]: commands },
+    },
+  },
 }) {
   if (commands === undefined) {
     return pluginHooks
@@ -48,10 +48,10 @@ const runInstructions = async function(instructions, { config, configPath, token
         configPath,
         token,
         baseDir,
-        error
+        error,
       })
     },
-    {}
+    {},
   )
   return manifest
 }
@@ -107,7 +107,7 @@ const execCommand = async function({ hook, command, baseDir }) {
 // Fire a plugin hook method
 const firePluginHook = async function(
   { type, hook, pluginPath, pluginConfig, hookName, constants },
-  { config, token, baseDir, error }
+  { config, token, baseDir, error },
 ) {
   try {
     await executePlugin('run', { pluginPath, pluginConfig, hookName, config, token, error, constants }, { baseDir })
diff --git a/packages/build/src/core/lifecycle.js b/packages/build/src/core/lifecycle.js
index e4c0f093d..960695159 100644
--- a/packages/build/src/core/lifecycle.js
+++ b/packages/build/src/core/lifecycle.js
@@ -57,7 +57,7 @@ const LIFECYCLE = [
    */
   'finally',
   // Todo onError is not part of lifecycle. Its a special handler
-  'onError'
+  'onError',
 ]
 
 module.exports = { LIFECYCLE }
diff --git a/packages/build/src/core/main.js b/packages/build/src/core/main.js
index 41fc38435..d47c41b31 100644
--- a/packages/build/src/core/main.js
+++ b/packages/build/src/core/main.js
@@ -18,7 +18,7 @@ const {
   logManifest,
   logBuildError,
   logBuildSuccess,
-  logBuildEnd
+  logBuildEnd,
 } = require('../log/main')
 const { startTimer, endTimer } = require('../log/timer')
 const isNetlifyCI = require('../utils/is-netlify-ci')
diff --git a/packages/build/src/heuristics/index.js b/packages/build/src/heuristics/index.js
index c736f9d0b..029dcf311 100644
--- a/packages/build/src/heuristics/index.js
+++ b/packages/build/src/heuristics/index.js
@@ -56,7 +56,7 @@ module.exports = async function getHeuristics({ pkgPath, configPath }) {
           acc['steps'] = acc['steps'].concat({
             name: null,
             raw: c,
-            parsed: c
+            parsed: c,
           })
           acc['raw'] = acc['raw'].concat(c)
           acc['combined'] = acc['raw'].join(' && ')
@@ -72,8 +72,8 @@ module.exports = async function getHeuristics({ pkgPath, configPath }) {
         command: '',
         steps: [],
         raw: [],
-        combined: ''
-      }
+        combined: '',
+      },
     )
     // console.log('vals', vals)
     // console.log('combined', buildInfo)
@@ -96,7 +96,7 @@ module.exports = async function getHeuristics({ pkgPath, configPath }) {
     // Resolved buildcommand info
     build: buildInfo,
     // Best guess of project type
-    projectType: typeofBuild
+    projectType: typeofBuild,
   }
 }
 
diff --git a/packages/build/src/install/misc/wapm.js b/packages/build/src/install/misc/wapm.js
index fcac0a423..53fd4f544 100644
--- a/packages/build/src/install/misc/wapm.js
+++ b/packages/build/src/install/misc/wapm.js
@@ -25,13 +25,13 @@ module.exports = async function installWapm(cwd, cacheDir) {
     await moveCache(
       path.join(cacheDir, '.wasmer/cache'),
       path.join(cwd, '.wasmer/cache'),
-      'restoring cached wasmer cache'
+      'restoring cached wasmer cache',
     )
     // restore_cwd_cache "wapm_packages" "wapm packages"
     await moveCache(
       path.join(cacheDir, '.wasmer/cache'),
       path.join(cwd, '.wasmer/cache'),
-      'restoring cached wasmer cache'
+      'restoring cached wasmer cache',
     )
 
     try {
diff --git a/packages/build/src/install/node/bower.js b/packages/build/src/install/node/bower.js
index ca6885e6a..25d0ecbe8 100644
--- a/packages/build/src/install/node/bower.js
+++ b/packages/build/src/install/node/bower.js
@@ -35,7 +35,7 @@ module.exports = async function installBower(cwd, cacheDir) {
     await moveCache(
       path.join(cacheDir, 'bower_components'),
       path.join(cwd, 'bower_components'),
-      'restoring cached bower_components'
+      'restoring cached bower_components',
     )
 
     // TODO move elsewhere. Seperate setup `bower` from the `bower install` steps
diff --git a/packages/build/src/install/node/install-deps.js b/packages/build/src/install/node/install-deps.js
index 8084efa0d..e45575e51 100644
--- a/packages/build/src/install/node/install-deps.js
+++ b/packages/build/src/install/node/install-deps.js
@@ -18,7 +18,7 @@ module.exports = async function installNodeDeps(cwd, cacheDir, yarnVersion) {
     await moveCache(
       path.join(cacheDir, 'node_modules'),
       path.join(cwd, 'node_modules'),
-      'restoring cached node_modules'
+      'restoring cached node_modules',
     )
     console.log('ho')
 
diff --git a/packages/build/src/install/node/run-yarn.js b/packages/build/src/install/node/run-yarn.js
index 5997192c5..c36c2cb4d 100644
--- a/packages/build/src/install/node/run-yarn.js
+++ b/packages/build/src/install/node/run-yarn.js
@@ -38,7 +38,7 @@ module.exports = async function runYarn(cwd, cacheDir, yarnVersion) {
       console.log(`Found yarn version (${version.stdout}) that doesn't match expected (${yarnVersion})"`)
       const deleteDirs = [
         yarnCacheDir,
-        path.join(process.env.HOME, '.yarn') // TODO verify path lookup
+        path.join(process.env.HOME, '.yarn'), // TODO verify path lookup
       ]
       // rm -rf $NETLIFY_CACHE_DIR/yarn $HOME/.yarn
       await removeFiles(deleteDirs)
@@ -50,7 +50,7 @@ module.exports = async function runYarn(cwd, cacheDir, yarnVersion) {
   if (!hasYarn) {
     console.log(`Installing yarn at version ${yarnVersion}`)
     const deleteDirs = [
-      yarnHomeDir // TODO verify path lookup
+      yarnHomeDir, // TODO verify path lookup
     ]
     // rm -rf $HOME/.yarn
     await removeFiles(deleteDirs)
diff --git a/packages/build/src/install/ruby/gems.js b/packages/build/src/install/ruby/gems.js
index 52315fc8c..b0b560191 100644
--- a/packages/build/src/install/ruby/gems.js
+++ b/packages/build/src/install/ruby/gems.js
@@ -25,8 +25,8 @@ module.exports = async function installRubyGems(cwd, cacheDir) {
         await execa(
           'bundle',
           ['install', '--path', '$NETLIFY_CACHE_DIR/bundle', '--binstubs=$NETLIFY_CACHE_DIR/binstubs'].concat(
-            BUNDLER_FLAGS ? [BUNDLER_FLAGS] : []
-          )
+            BUNDLER_FLAGS ? [BUNDLER_FLAGS] : [],
+          ),
           // @TODO ^ verify this ${BUNDLER_FLAGS:+"$BUNDLER_FLAGS"}
         )
       } catch (err) {
diff --git a/packages/build/src/install/ruby/index.js b/packages/build/src/install/ruby/index.js
index 24148b257..4a0975cae 100644
--- a/packages/build/src/install/ruby/index.js
+++ b/packages/build/src/install/ruby/index.js
@@ -81,7 +81,7 @@ module.exports = async function installRuby(cwd, cacheDir, version) {
     console.log('** WARNING **')
     console.log(`Using custom ruby version ${druby}, this will slow down the build.`)
     console.log(
-      'To ensure fast builds, set the RUBY_VERSION environment variable, or .ruby-version file, to an included ruby version.'
+      'To ensure fast builds, set the RUBY_VERSION environment variable, or .ruby-version file, to an included ruby version.',
     )
     // echo "Included versions: ${rvs[@]#ruby-}"
     console.log(`Included versions: ${rvs}`)
@@ -89,7 +89,7 @@ module.exports = async function installRuby(cwd, cacheDir, version) {
     try {
       // @TODO verify command
       await execa('rvm', ['--quiet-curl', '--create', 'use', druby], {
-        rvm_install_on_use_flag: '1'
+        rvm_install_on_use_flag: '1',
       })
     } catch (err) {
       console.log(`Failed to install ruby version '${druby}'`, err)
diff --git a/packages/build/src/install/serverless/zip-and-ship.js b/packages/build/src/install/serverless/zip-and-ship.js
index d73fb813d..89d67ea48 100644
--- a/packages/build/src/install/serverless/zip-and-ship.js
+++ b/packages/build/src/install/serverless/zip-and-ship.js
@@ -29,7 +29,7 @@ module.exports = async function installZola(cwd, cacheDir) {
     await execa('ln', [
       '-s',
       `/opt/buildhome/.binrc/bin/zip-it-and-ship-it_${ZISI_VERSION}`,
-      '/opt/buildhome/.binrc/bin/zip-it-and-ship-it'
+      '/opt/buildhome/.binrc/bin/zip-it-and-ship-it',
     ])
 
     const version = await execa('zip-it-and-ship-it', ['--version'])
diff --git a/packages/build/src/log/colors.js b/packages/build/src/log/colors.js
index e2e4f477a..bb4736d2d 100644
--- a/packages/build/src/log/colors.js
+++ b/packages/build/src/log/colors.js
@@ -1,10 +1,10 @@
 const {
   env,
   // eslint-disable-next-line node/no-unsupported-features/node-builtins
-  stdout: { isTTY, getColorDepth }
+  stdout: { isTTY, getColorDepth },
 } = require('process')
 const {
-  inspect: { defaultOptions }
+  inspect: { defaultOptions },
 } = require('util')
 
 const isNetlifyCI = require('../utils/is-netlify-ci')
diff --git a/packages/build/src/log/main.js b/packages/build/src/log/main.js
index da3215d4b..001930f5f 100644
--- a/packages/build/src/log/main.js
+++ b/packages/build/src/log/main.js
@@ -70,7 +70,7 @@ const logDryRunInstruction = function({
   index,
   configPath,
   width,
-  buildInstructions
+  buildInstructions,
 }) {
   const countText = `${index + 1}.`
   const count = cyanBright(countText)
@@ -117,8 +117,8 @@ const logInstruction = function({ hook, name, override }, { index, configPath, e
   if (override.hook) {
     log(
       redBright.bold(
-        `${HEADING_PREFIX} OVERRIDE: "${override.hook}" method in "${override.type}" has been overriden by "${name}"`
-      )
+        `${HEADING_PREFIX} OVERRIDE: "${override.hook}" method in "${override.type}" has been overriden by "${name}"`,
+      ),
     )
   }
   const lifecycleName = error ? '' : 'lifecycle '
@@ -228,7 +228,7 @@ const logBuildEnd = function({ instructions, config, duration }) {
     steps: instructions.length,
     duration,
     pluginCount: plugins.length,
-    plugins
+    plugins,
   })
 }
 
@@ -254,5 +254,5 @@ module.exports = {
   logErrorInstructions,
   logBuildError,
   logBuildSuccess,
-  logBuildEnd
+  logBuildEnd,
 }
diff --git a/packages/build/src/log/stack.js b/packages/build/src/log/stack.js
index eedac7eb0..65805067b 100644
--- a/packages/build/src/log/stack.js
+++ b/packages/build/src/log/stack.js
@@ -1,5 +1,5 @@
 const {
-  env: { DEBUG_BUILD }
+  env: { DEBUG_BUILD },
 } = require('process')
 
 const StackUtils = require('stack-utils')
diff --git a/packages/build/src/plugins/deploy/index.js b/packages/build/src/plugins/deploy/index.js
index cf66b0988..0e6b90906 100644
--- a/packages/build/src/plugins/deploy/index.js
+++ b/packages/build/src/plugins/deploy/index.js
@@ -46,11 +46,11 @@ module.exports = {
         fnDir: build.functions,
         statusCb: () => {},
         draft: !deployToProduction,
-        message: 'Site deployed from @netlify/build'
+        message: 'Site deployed from @netlify/build',
       })
     } catch (err) {
       console.log('Deploying site error')
       throw new Error(err)
     }
-  }
+  },
 }
diff --git a/packages/build/src/plugins/functions/index.js b/packages/build/src/plugins/functions/index.js
index cc07c28d4..882fc4953 100644
--- a/packages/build/src/plugins/functions/index.js
+++ b/packages/build/src/plugins/functions/index.js
@@ -1,7 +1,7 @@
 const { tmpdir } = require('os')
 const { resolve } = require('path')
 const {
-  env: { DEPLOY_ID }
+  env: { DEPLOY_ID },
 } = require('process')
 
 const pathExists = require('path-exists')
@@ -22,8 +22,8 @@ const functionsPlugin = function(pluginConfig, { build: { functions: srcDir } })
 // Validate plugin configuration at startup
 const init = async function({
   config: {
-    build: { functions: srcDir }
-  }
+    build: { functions: srcDir },
+  },
 }) {
   if (!(await pathExists(srcDir))) {
     throw new Error(`Functions directory "${resolve(srcDir)}" not found`)
@@ -33,8 +33,8 @@ const init = async function({
 // Bundle Netlify functions
 const functionsBuild = async function({
   config: {
-    build: { functions: srcDir }
-  }
+    build: { functions: srcDir },
+  },
 }) {
   const destDir = getDestDir()
 
diff --git a/packages/build/src/plugins/ipc.js b/packages/build/src/plugins/ipc.js
index 498a179dd..4c5bb109a 100644
--- a/packages/build/src/plugins/ipc.js
+++ b/packages/build/src/plugins/ipc.js
@@ -26,14 +26,14 @@ const executePlugin = async function(eventName, message, { baseDir }) {
   const childProcess = execa('node', [CHILD_MAIN_PATH, eventName, messageString], {
     cwd: baseDir,
     stdio: ['ignore', 'pipe', 'pipe', 'pipe'],
-    preferLocal: true
+    preferLocal: true,
   })
   redactProcess(childProcess)
 
   try {
     const [{ all: output }, responseString] = await Promise.all([
       childProcess,
-      getStream(childProcess.stdio[RESPONSE_FD])
+      getStream(childProcess.stdio[RESPONSE_FD]),
     ])
 
     const response = parseMessage(responseString)
diff --git a/packages/build/src/plugins/load.js b/packages/build/src/plugins/load.js
index 67083b199..460995de3 100644
--- a/packages/build/src/plugins/load.js
+++ b/packages/build/src/plugins/load.js
@@ -11,7 +11,7 @@ const loadPlugins = async function({ pluginsOptions, config, configPath, baseDir
   logLoadPlugins()
 
   const hooks = await Promise.all(
-    pluginsOptions.map(pluginOptions => loadPlugin(pluginOptions, { config, configPath, baseDir, token }))
+    pluginsOptions.map(pluginOptions => loadPlugin(pluginOptions, { config, configPath, baseDir, token })),
   )
   const hooksA = hooks.flat().filter(isNotOverridden)
   const pluginsHooks = groupBy(hooksA, 'hook')
@@ -22,7 +22,7 @@ const loadPlugins = async function({ pluginsOptions, config, configPath, baseDir
 // Do it by executing the plugin `load` event handler.
 const loadPlugin = async function(
   { type, pluginPath, pluginConfig, pluginId, core },
-  { config, configPath, baseDir, token }
+  { config, configPath, baseDir, token },
 ) {
   logLoadPlugin(pluginId, type, core)
 
@@ -30,7 +30,7 @@ const loadPlugin = async function(
     const { response: hooks } = await executePlugin(
       'load',
       { pluginId, type, pluginPath, pluginConfig, configPath, config, core },
-      { baseDir }
+      { baseDir },
     )
     return hooks
   } catch (error) {
diff --git a/packages/build/src/plugins/options.js b/packages/build/src/plugins/options.js
index 0e3168636..c2adcf64a 100644
--- a/packages/build/src/plugins/options.js
+++ b/packages/build/src/plugins/options.js
@@ -9,7 +9,7 @@ const getPluginsOptions = function({ config: { plugins: pluginsOptions } }) {
 }
 
 const DEFAULT_PLUGINS = {
-  '@netlify/functions': { type: `${DEFAULT_PLUGINS_DIR}/functions/index.js`, core: true }
+  '@netlify/functions': { type: `${DEFAULT_PLUGINS_DIR}/functions/index.js`, core: true },
 }
 
 const normalizePluginOptions = function([pluginId, pluginOptions]) {
diff --git a/packages/build/src/plugins/override.js b/packages/build/src/plugins/override.js
index 4efb4b349..a123b7394 100644
--- a/packages/build/src/plugins/override.js
+++ b/packages/build/src/plugins/override.js
@@ -13,7 +13,7 @@ const getOverride = function(hookName) {
 const isNotOverridden = function(lifeCycleHook, index, lifeCycleHooks) {
   return !lifeCycleHooks.some(
     ({ override: { hook, type } }, indexA) =>
-      index !== indexA && hook === lifeCycleHook.hook && type === lifeCycleHook.type
+      index !== indexA && hook === lifeCycleHook.hook && type === lifeCycleHook.type,
   )
 }
 
diff --git a/packages/build/src/scaffold/bin.js b/packages/build/src/scaffold/bin.js
index 4b3d5968e..4c1dc3600 100644
--- a/packages/build/src/scaffold/bin.js
+++ b/packages/build/src/scaffold/bin.js
@@ -7,7 +7,7 @@ runBuild({
   zisiTempDir: '',
   nodeVersion: '10.16.0',
   rubyVersion: '2.6.2',
-  yarnVersion: ''
+  yarnVersion: '',
 }).catch(err => {
   console.log('err', err)
 })
diff --git a/packages/build/src/scaffold/main.js b/packages/build/src/scaffold/main.js
index 116cdd9e2..00761e57a 100644
--- a/packages/build/src/scaffold/main.js
+++ b/packages/build/src/scaffold/main.js
@@ -59,7 +59,7 @@ module.exports = async function runBuild(config) {
     phpVersion,
     goVersion,
     CWD: CWD,
-    NETLIFY_CACHE_DIR: NETLIFY_CACHE_DIR
+    NETLIFY_CACHE_DIR: NETLIFY_CACHE_DIR,
   })
 
   /* Parse build command and try to fix missing deps */
diff --git a/packages/build/src/scaffold/utils/create-directories.js b/packages/build/src/scaffold/utils/create-directories.js
index 045282fa4..6b4510e50 100644
--- a/packages/build/src/scaffold/utils/create-directories.js
+++ b/packages/build/src/scaffold/utils/create-directories.js
@@ -29,7 +29,7 @@ const directories = [
   `${NETLIFY_CACHE_DIR}/.composer`,
   `${NETLIFY_CACHE_DIR}/.gimme_cache/gopath`,
   `${NETLIFY_CACHE_DIR}/.gimme_cache/gocache`,
-  `${NETLIFY_CACHE_DIR}/.wasmer/cache`
+  `${NETLIFY_CACHE_DIR}/.wasmer/cache`,
 ]
 
 const globals = {
@@ -43,7 +43,7 @@ const globals = {
   PIPENV_VENV_IN_PROJECT: 1,
   PIPENV_DEFAULT_PYTHON_VERSION: 2.7,
   // CI signal
-  NETLIFY: true
+  NETLIFY: true,
 }
 
 // https://github.com/netlify/build-image/blob/9e0f207a27642d0115b1ca97cd5e8cebbe492f63/run-build-functions.sh#L5-L57
@@ -64,7 +64,7 @@ module.exports = async function runBuildFunction() {
     directories.map(dir => {
       console.log(`Make directory ${dir}`)
       return makeDir(dir)
-    })
+    }),
   )
 
   return newDirPaths
diff --git a/packages/build/src/scaffold/utils/findRunningProcs.js b/packages/build/src/scaffold/utils/findRunningProcs.js
index 92e9797a0..6e6b0f288 100644
--- a/packages/build/src/scaffold/utils/findRunningProcs.js
+++ b/packages/build/src/scaffold/utils/findRunningProcs.js
@@ -4,7 +4,7 @@ async function findRunningProcs() {
   let stdout
   try {
     const proc = await execAsync(
-      'ps aux | grep -v [p]s | grep -v [g]rep | grep -v [b]ash | grep -v "/usr/local/bin/buildbot" | grep -v [d]efunct | grep -v "[build]"'
+      'ps aux | grep -v [p]s | grep -v [g]rep | grep -v [b]ash | grep -v "/usr/local/bin/buildbot" | grep -v [d]efunct | grep -v "[build]"',
     )
     /* didnt work with execa
     const proc = await execa('ps', [
@@ -38,5 +38,5 @@ function getProcessCount(processes) {
 
 module.exports = {
   findRunningProcs,
-  getProcessCount
+  getProcessCount,
 }
diff --git a/packages/build/src/utils/fs.js b/packages/build/src/utils/fs.js
index fbf67f359..4c3d2cfeb 100644
--- a/packages/build/src/utils/fs.js
+++ b/packages/build/src/utils/fs.js
@@ -61,5 +61,5 @@ module.exports = {
   writeFile,
   readFile,
   copyFiles,
-  removeFiles
+  removeFiles,
 }
diff --git a/packages/build/src/utils/telemetry/api.js b/packages/build/src/utils/telemetry/api.js
index f63cda51b..c5ce5d743 100644
--- a/packages/build/src/utils/telemetry/api.js
+++ b/packages/build/src/utils/telemetry/api.js
@@ -5,11 +5,11 @@ module.exports = function sendData(payload, version) {
   const args = JSON.stringify({
     reqType: payload.type,
     data: payload,
-    version: version
+    version: version,
   })
   // Spawn detached child process to send telemetry
   spawn(process.execPath, [join(__dirname, 'request.js'), args], {
     detached: true,
-    stdio: 'ignore'
+    stdio: 'ignore',
   }).unref()
 }
diff --git a/packages/build/src/utils/telemetry/index.js b/packages/build/src/utils/telemetry/index.js
index 0493698d6..7a221a20c 100644
--- a/packages/build/src/utils/telemetry/index.js
+++ b/packages/build/src/utils/telemetry/index.js
@@ -11,7 +11,7 @@ const telemetry = Analytics({
   app: 'netlifyCI',
   debug: DEBUG_ENABLED,
   version: pkg.version,
-  plugins: plugins
+  plugins: plugins,
 })
 
 module.exports = telemetry
diff --git a/packages/build/src/utils/telemetry/plugins.js b/packages/build/src/utils/telemetry/plugins.js
index 8816cd8e0..ad79a4521 100644
--- a/packages/build/src/utils/telemetry/plugins.js
+++ b/packages/build/src/utils/telemetry/plugins.js
@@ -16,9 +16,9 @@ const prefixEventNames = {
     const prefixedEvent = event.startsWith(prefix) ? event : `${prefix}${event}`
     return {
       ...payload,
-      event: prefixedEvent
+      event: prefixedEvent,
     }
-  }
+  },
 }
 
 /* enrich telemetry payload */
@@ -36,10 +36,10 @@ const enrichPayload = {
         // Add package version
         buildVersion: pkg.version,
         // Add node version
-        nodeVersion: process.version.replace(/^v/, '')
-      }
+        nodeVersion: process.version.replace(/^v/, ''),
+      },
     }
-  }
+  },
 }
 
 /* Sent data to telemetry service, if telemetry enabled */
@@ -51,7 +51,7 @@ const netlifyTelemetry = {
       return
     }
     sendData(payload, pkg.version)
-  }
+  },
 }
 
 /* If BUILD_TELEMETRY_DISABLED, disable api calls */
diff --git a/packages/build/src/utils/telemetry/request.js b/packages/build/src/utils/telemetry/request.js
index 8901e9c7e..e23e4b3b0 100644
--- a/packages/build/src/utils/telemetry/request.js
+++ b/packages/build/src/utils/telemetry/request.js
@@ -7,7 +7,7 @@ const { data, reqType, version } = JSON.parse(process.argv[2])
 const API_HOST = 'telemetry-service.netlify.com'
 const API_PATHS = {
   track: '/collect',
-  identify: '/identify'
+  identify: '/identify',
 }
 
 const payload = JSON.stringify(data)
@@ -21,14 +21,14 @@ const req = https.request(
       'Content-Type': 'application/json',
       'Content-Length': payload.length,
       'X-Netlify-Client': 'NETLIFY_CI',
-      'X-Netlify-Client-Version': version
-    }
+      'X-Netlify-Client-Version': version,
+    },
   },
   res => {
     res.on('data', d => {
       process.exit()
     })
-  }
+  },
 )
 
 req.on('error', e => {
diff --git a/packages/config/index.js b/packages/config/index.js
index d1022c572..f401934be 100644
--- a/packages/config/index.js
+++ b/packages/config/index.js
@@ -24,7 +24,7 @@ async function resolveConfig(configFile, options) {
         async resolver() {
           // Call to remote secret store
           return 'shhhhhhh'
-        }
+        },
       },
       {
         /* Match variables ${context:xyz} */
@@ -32,9 +32,9 @@ async function resolveConfig(configFile, options) {
         async resolver(varToProcess, { context = 'production' }) {
           const objectPath = varToProcess.replace('context:', '')
           return `\${self:context.${context}.${objectPath}}`
-        }
-      }
-    ]
+        },
+      },
+    ],
   })
 
   validateConfig(config)
diff --git a/packages/config/normalize.js b/packages/config/normalize.js
index e76480764..6b3591535 100644
--- a/packages/config/normalize.js
+++ b/packages/config/normalize.js
@@ -12,8 +12,8 @@ const DEFAULT_CONFIG = { build: {}, plugins: {} }
 const normalizeLifecycles = function({
   config,
   config: {
-    build: { command, lifecycle = {}, ...build }
-  }
+    build: { command, lifecycle = {}, ...build },
+  },
 }) {
   const lifecycleA = normalizeCommand(lifecycle, command)
 
diff --git a/packages/config/validate.js b/packages/config/validate.js
index 8310a0bc7..ae45283e1 100644
--- a/packages/config/validate.js
+++ b/packages/config/validate.js
@@ -6,7 +6,7 @@ const validateConfig = function(config) {
 const validateOldCommand = function({ build: { command, lifecycle } = {} }) {
   if (command !== undefined && lifecycle !== undefined) {
     throw new Error(
-      `'build.command' and 'build.lifecycle' are both defined in the configuration. Please rename 'build.command' to 'build.lifecycle.build'`
+      `'build.command' and 'build.lifecycle' are both defined in the configuration. Please rename 'build.command' to 'build.lifecycle.build'`,
     )
   }
 }
diff --git a/packages/netlify-plugin-axe/index.js b/packages/netlify-plugin-axe/index.js
index da8450b9b..1d76a7941 100644
--- a/packages/netlify-plugin-axe/index.js
+++ b/packages/netlify-plugin-axe/index.js
@@ -23,7 +23,7 @@ module.exports = {
 
     await execa.command(`axe ${testSite} ${axeFlags} --save ${resultsPath}`, {
       preferLocal: true,
-      stdio: 'inherit'
+      stdio: 'inherit',
     })
 
     let results = require(resultsPath)
@@ -31,5 +31,5 @@ module.exports = {
       results = results[0].violations
     }
     console.log({ violations: results })
-  }
+  },
 }
diff --git a/packages/netlify-plugin-encrypted-files/index.js b/packages/netlify-plugin-encrypted-files/index.js
index 4cb5a49a7..a3231d90c 100644
--- a/packages/netlify-plugin-encrypted-files/index.js
+++ b/packages/netlify-plugin-encrypted-files/index.js
@@ -5,5 +5,5 @@ module.exports = {
   init() {
     console.log('decrypting files')
     pluginDecrypt()
-  }
+  },
 }
diff --git a/packages/netlify-plugin-encrypted-files/pluginDecrypt.js b/packages/netlify-plugin-encrypted-files/pluginDecrypt.js
index 2d37fa2da..3cedeed24 100644
--- a/packages/netlify-plugin-encrypted-files/pluginDecrypt.js
+++ b/packages/netlify-plugin-encrypted-files/pluginDecrypt.js
@@ -31,7 +31,7 @@ const { NETLIFY_ENCRYPT_KEY } = process.env
 
 module.exports = function pluginDecrypt({
   // unzip to '.testdecrypt' folder instead of overwriting real files
-  testdecrypt = false
+  testdecrypt = false,
 }) {
   if (typeof NETLIFY_ENCRYPT_KEY === 'undefined') {
     console.error('must define NETLIFY_ENCRYPT_KEY to use netlify-plugin-encrypted-files')
diff --git a/packages/netlify-plugin-example/index.js b/packages/netlify-plugin-example/index.js
index cebd2acb4..046e22802 100644
--- a/packages/netlify-plugin-example/index.js
+++ b/packages/netlify-plugin-example/index.js
@@ -13,5 +13,5 @@ module.exports = {
     if (sites) {
       console.log(`Site count! ${sites.length}`)
     }
-  }
+  },
 }
diff --git a/packages/netlify-plugin-functions/index.js b/packages/netlify-plugin-functions/index.js
index ec1924d18..294e9518e 100644
--- a/packages/netlify-plugin-functions/index.js
+++ b/packages/netlify-plugin-functions/index.js
@@ -37,7 +37,7 @@ module.exports = {
         const originalPath = `/.netlify/functions/${functionName}`
         acc.rewrites = acc.rewrites.concat({
           fromPath: functionData.path,
-          toPath: originalPath
+          toPath: originalPath,
         })
 
         console.log(`Mapping ${functionData.path} to ${originalPath}. Method: ${functionData.method}`)
@@ -47,7 +47,7 @@ module.exports = {
           name: functionName,
           filename: functionData.handler,
           path: functionPath,
-          method: functionData.method
+          method: functionData.method,
         })
 
         return acc
@@ -55,8 +55,8 @@ module.exports = {
       {
         functions: [],
         rewrites: [],
-        redirects: []
-      }
+        redirects: [],
+      },
     )
 
     const buildDir = resolve(build.publish)
@@ -74,7 +74,7 @@ module.exports = {
     await writeRedirectsFile(buildFolder, data.redirects, data.rewrites)
 
     console.log('Functions ready!')
-  }
+  },
 }
 
 async function processFunction(func, destFolder) {
@@ -188,7 +188,7 @@ async function writeRedirectsFile(buildDir, redirects, rewrites) {
 
       if (typeof value === `string` && value.indexOf(` `) >= 0) {
         console.warn(
-          `Invalid redirect value "${value}" specified for key "${key}". ` + `Values should not contain spaces.`
+          `Invalid redirect value "${value}" specified for key "${key}". ` + `Values should not contain spaces.`,
         )
       } else {
         pieces.push(`${key}=${value}`)
diff --git a/packages/netlify-plugin-lighthouse/index.js b/packages/netlify-plugin-lighthouse/index.js
index 6654d599d..33b993f0e 100644
--- a/packages/netlify-plugin-lighthouse/index.js
+++ b/packages/netlify-plugin-lighthouse/index.js
@@ -22,7 +22,7 @@ module.exports = {
     // bc they may want to set `defaults` and `schema` and `de/serialize`
     const store = new Conf({
       cwd: resolve('cache'),
-      configName: 'netlify-plugin-lighthouse'
+      configName: 'netlify-plugin-lighthouse',
     })
 
     // TODO: fetch previous scores from cache
@@ -35,8 +35,8 @@ module.exports = {
     if (prevLightHouse) {
       console.log(
         `Comparing lighthouse results from version: ${chalk.yellow(compareWithVersion)} to version: ${chalk.yellow(
-          currentVersion
-        )}:`
+          currentVersion,
+        )}:`,
       )
       Object.entries(curLightHouse).forEach(([k, v]) => {
         const prevV = prevLightHouse[k]
@@ -60,11 +60,11 @@ module.exports = {
         console.warn(
           `Warning: you set ${chalk.yellow('compareWithVersion') +
             '=' +
-            chalk.yellow(compareWithVersion)} but that version was not found in our result storage.`
+            chalk.yellow(compareWithVersion)} but that version was not found in our result storage.`,
         )
       }
     }
     store.set(`lighthouse.${currentVersion}`, curLightHouse)
     console.log(`Saved results as version: ${chalk.yellow(currentVersion)}`)
-  }
+  },
 }
diff --git a/packages/netlify-plugin-monorepo/index.js b/packages/netlify-plugin-monorepo/index.js
index 8a482d819..e97cac60d 100644
--- a/packages/netlify-plugin-monorepo/index.js
+++ b/packages/netlify-plugin-monorepo/index.js
@@ -40,7 +40,7 @@ module.exports = {
       const currentBranch = await gitBranchName()
       const result = await diff({
         since: since || currentBranch,
-        files: filesToCheck
+        files: filesToCheck,
       })
       // console.log('result', result)
       if (!result.matched.length) {
@@ -52,7 +52,7 @@ module.exports = {
       const changedFiles = result.matched.map(file => {
         return {
           path: file,
-          fullPath: resolve(file)
+          fullPath: resolve(file),
         }
       })
       // console.log('changedFiles', changedFiles)
@@ -66,7 +66,7 @@ module.exports = {
       console.error(error)
       process.exit(0)
     }
-  }
+  },
 }
 
 async function gitBranchName() {
diff --git a/packages/netlify-plugin-no-more-404/index.js b/packages/netlify-plugin-no-more-404/index.js
index b11cd17fe..62370f99e 100644
--- a/packages/netlify-plugin-no-more-404/index.js
+++ b/packages/netlify-plugin-no-more-404/index.js
@@ -28,7 +28,7 @@ function netlify404nomore(pluginConfig) {
       // bc they may want to set `defaults` and `schema` and `de/serialize`
       const store = new Conf({
         cwd: CACHE_DIR,
-        configName: 'netlify-plugin-no-more-404'
+        configName: 'netlify-plugin-no-more-404',
       })
 
       const buildFolderPath = path.resolve(BUILD_DIR)
@@ -68,7 +68,7 @@ function netlify404nomore(pluginConfig) {
             const toPath1 = path.join(buildFolderPath, match.to + '.html')
             const toPath2 = path.join(
               buildFolderPath,
-              match.to + (match.to.endsWith('index.html') ? '' : '/index.html')
+              match.to + (match.to.endsWith('index.html') ? '' : '/index.html'),
             )
             if (fs.existsSync(toPath1) || fs.existsSync(toPath2)) {
               // exists! no longer need to check for broken links
@@ -76,8 +76,8 @@ function netlify404nomore(pluginConfig) {
               // the redirect itself is invalid!
               console.error(
                 `Redirect from ${chalk.yellow(match.from)} to ${chalk.yellow(
-                  match.to
-                )} directs to a missing page... please check!`
+                  match.to,
+                )} directs to a missing page... please check!`,
               )
               invalidRedirectDestinations.push(match.to)
             }
@@ -98,22 +98,22 @@ function netlify404nomore(pluginConfig) {
           missingFiles.forEach(mf => {
             console.error(
               `${chalk.red('@netlify/plugin-no-more-404:')}: can't find ${chalk.cyan(
-                path.relative(buildFolderPath, mf)
-              )} which existed in previous build`
+                path.relative(buildFolderPath, mf),
+              )} which existed in previous build`,
             )
           })
           if (missingFiles.length) {
             console.log(
               `Missing HTML files detected. If you intentionally changed URL structure, you should set up redirects: ${chalk.cyan(
-                'https://url.netlify.com/B1qkCwqOr'
-              )}`
+                'https://url.netlify.com/B1qkCwqOr',
+              )}`,
             )
           }
           invalidRedirectDestinations.forEach(ird => {
             console.error(
               `${chalk.red('@netlify/plugin-no-more-404:')}: can't find ${chalk.cyan(
-                path.relative(buildFolderPath, ird)
-              )}, which redirects rely on`
+                path.relative(buildFolderPath, ird),
+              )}, which redirects rely on`,
             )
           })
           if (on404 === 'error') {
@@ -136,7 +136,7 @@ function netlify404nomore(pluginConfig) {
       var uniqueItems = Array.from(new Set(items))
       store.set(`manifest`, uniqueItems)
       console.log('html manifest saved for next run')
-    }
+    },
   }
 }
 
@@ -156,7 +156,7 @@ var walk = async function(dir, filelist) {
       } else {
         filelist.push(dirfile)
       }
-    })
+    }),
   )
   return filelist
 }
diff --git a/packages/netlify-plugin-no-more-404/matchRules.js b/packages/netlify-plugin-no-more-404/matchRules.js
index fb238d759..75669f3b5 100644
--- a/packages/netlify-plugin-no-more-404/matchRules.js
+++ b/packages/netlify-plugin-no-more-404/matchRules.js
@@ -21,7 +21,7 @@ async function matchRules(relativeUrl, projectDir) {
       scheme: reqUrl.protocol,
       host: reqUrl.hostname,
       path: reqUrl.pathname,
-      query: reqUrl.search.slice(1)
+      query: reqUrl.search.slice(1),
       // headers,
       // cookieValues,
       // getHeader: name => headers[name.toLowerCase()] || '',
@@ -43,7 +43,7 @@ const getMatcher = projectDir => {
     return redirector
       .parseJSON(JSON.stringify(rules), {
         jwtSecret: 'secret',
-        jwtRole: 'app_metadata.authorization.roles'
+        jwtRole: 'app_metadata.authorization.roles',
       })
       .then(m => {
         const matcher = m
@@ -53,6 +53,6 @@ const getMatcher = projectDir => {
   return Promise.resolve({
     match() {
       return null
-    }
+    },
   })
 }
diff --git a/packages/netlify-plugin-no-more-404/parseRules.js b/packages/netlify-plugin-no-more-404/parseRules.js
index dba027652..fb38af31b 100644
--- a/packages/netlify-plugin-no-more-404/parseRules.js
+++ b/packages/netlify-plugin-no-more-404/parseRules.js
@@ -10,7 +10,7 @@ function parseRules(projectDir) {
   const baseRedirectsPath = path.resolve(projectDir, '_redirects')
   if (fs.existsSync(baseRedirectsPath)) {
     rules = rules.concat(
-      parseFile(redirectParser.parseRedirectsFormat, '_redirects', fs.readFileSync(baseRedirectsPath, 'utf-8'))
+      parseFile(redirectParser.parseRedirectsFormat, '_redirects', fs.readFileSync(baseRedirectsPath, 'utf-8')),
     )
   }
 
diff --git a/packages/netlify-plugin-sitemap/index.js b/packages/netlify-plugin-sitemap/index.js
index 7a5b6ad1a..9c807bfc8 100644
--- a/packages/netlify-plugin-sitemap/index.js
+++ b/packages/netlify-plugin-sitemap/index.js
@@ -17,14 +17,14 @@ async function makeSitemap(opts = {}) {
       changefreq: 'weekly',
       priority: 0.8,
       lastmodrealtime: true,
-      lastmodfile: file
+      lastmodfile: file,
     }
   })
   console.log('homepage', homepage)
   const options = {
     hostname: `${homepage.replace(/\/$/, '')}/`,
     cacheTime: 600000, // 600 sec cache period
-    urls
+    urls,
   }
   // Creates a sitemap object given the input configuration with URLs
   const sitemap = sm.createSitemap(options)
@@ -55,5 +55,5 @@ module.exports = {
     }
     console.log('Creating sitemap from files...')
     await makeSitemap({ homepage: baseUrl, distPath: buildDir })
-  }
+  },
 }
diff --git a/packages/netlify-plugin-svgoptimizer/index.js b/packages/netlify-plugin-svgoptimizer/index.js
index 1fbf687fb..23d974640 100644
--- a/packages/netlify-plugin-svgoptimizer/index.js
+++ b/packages/netlify-plugin-svgoptimizer/index.js
@@ -8,105 +8,105 @@ const pkg = require('./package.json')
 const svgoinit = new svgo({
   plugins: [
     {
-      cleanupAttrs: true
+      cleanupAttrs: true,
     },
     {
-      removeDoctype: true
+      removeDoctype: true,
     },
     {
-      removeXMLProcInst: true
+      removeXMLProcInst: true,
     },
     {
-      removeComments: true
+      removeComments: true,
     },
     {
-      removeMetadata: true
+      removeMetadata: true,
     },
     {
-      removeTitle: true
+      removeTitle: true,
     },
     {
-      removeDesc: true
+      removeDesc: true,
     },
     {
-      removeUselessDefs: true
+      removeUselessDefs: true,
     },
     {
-      removeEditorsNSData: true
+      removeEditorsNSData: true,
     },
     {
-      removeEmptyAttrs: true
+      removeEmptyAttrs: true,
     },
     {
-      removeHiddenElems: true
+      removeHiddenElems: true,
     },
     {
-      removeEmptyText: true
+      removeEmptyText: true,
     },
     {
-      removeEmptyContainers: true
+      removeEmptyContainers: true,
     },
     {
-      removeViewBox: false
+      removeViewBox: false,
     },
     {
-      cleanupEnableBackground: true
+      cleanupEnableBackground: true,
     },
     {
-      convertStyleToAttrs: true
+      convertStyleToAttrs: true,
     },
     {
-      convertColors: true
+      convertColors: true,
     },
     {
-      convertPathData: true
+      convertPathData: true,
     },
     {
-      convertTransform: true
+      convertTransform: true,
     },
     {
-      removeUnknownsAndDefaults: true
+      removeUnknownsAndDefaults: true,
     },
     {
-      removeNonInheritableGroupAttrs: true
+      removeNonInheritableGroupAttrs: true,
     },
     {
-      removeUselessStrokeAndFill: true
+      removeUselessStrokeAndFill: true,
     },
     {
-      removeUnusedNS: true
+      removeUnusedNS: true,
     },
     {
-      cleanupIDs: true
+      cleanupIDs: true,
     },
     {
-      cleanupNumericValues: true
+      cleanupNumericValues: true,
     },
     {
-      moveElemsAttrsToGroup: true
+      moveElemsAttrsToGroup: true,
     },
     {
-      moveGroupAttrsToElems: true
+      moveGroupAttrsToElems: true,
     },
     {
-      collapseGroups: true
+      collapseGroups: true,
     },
     {
-      removeRasterImages: false
+      removeRasterImages: false,
     },
     {
-      mergePaths: false
+      mergePaths: false,
     },
     {
-      convertShapeToPath: true
+      convertShapeToPath: true,
     },
     {
-      sortAttrs: true
+      sortAttrs: true,
     },
     {
-      removeDimensions: true
-    }
-  ]
+      removeDimensions: true,
+    },
+  ],
 })
 
 module.exports = {
@@ -135,5 +135,5 @@ module.exports = {
         })
       })
     })
-  }
+  },
 }
diff --git a/packages/netlify-plugin-twiliosms/index.js b/packages/netlify-plugin-twiliosms/index.js
index c017e8eda..ce595c93e 100644
--- a/packages/netlify-plugin-twiliosms/index.js
+++ b/packages/netlify-plugin-twiliosms/index.js
@@ -7,8 +7,8 @@ const {
     // Text this number
     TO_NUM,
     // From a valid Twilio number
-    FROM_NUM
-  }
+    FROM_NUM,
+  },
 } = require('process')
 
 const Twilio = require('twilio')
@@ -21,8 +21,8 @@ module.exports = {
     const { sid } = await client.messages.create({
       body: 'Hi there, we just deployed the site successfully!',
       to: TO_NUM,
-      from: FROM_NUM
+      from: FROM_NUM,
     })
     console.log(sid)
-  }
+  },
 }
diff --git a/scripts/docs.js b/scripts/docs.js
index 7e7295025..8a70f97e8 100644
--- a/scripts/docs.js
+++ b/scripts/docs.js
@@ -8,7 +8,7 @@ const rootDir = path.join(__dirname, '..')
 const nonLifecycleKeys = ['onError']
 const CONSTANTS = {
   rootDir: rootDir,
-  lifecycle: path.join(rootDir, 'packages/build/src/core/lifecycle.js')
+  lifecycle: path.join(rootDir, 'packages/build/src/core/lifecycle.js'),
 }
 
 function parseJsDoc(contents) {
@@ -120,8 +120,8 @@ const config = {
           updatedContent += `\n`
         })
       return updatedContent.replace(/^\s+|\s+$/g, '')
-    }
-  }
+    },
+  },
 }
 
 function formatName(name) {
@@ -192,7 +192,7 @@ const markdownFiles = [
   path.join(rootDir, 'examples/**/**.md'),
   `!${path.join(rootDir, 'examples/**/node_modules/**/**.md')}`,
   `!${path.join(rootDir, 'packages/**/node_modules/**/**.md')}`,
-  '!node_modules'
+  '!node_modules',
 ]
 markdownMagic(markdownFiles, config, () => {
   console.log('Doc generation complete')


Test patch:
diff --git a/packages/build/src/heuristics/tests/test.js b/packages/build/src/heuristics/tests/test.js
index 5106c864d..29ee1c3a3 100644
--- a/packages/build/src/heuristics/tests/test.js
+++ b/packages/build/src/heuristics/tests/test.js
@@ -6,13 +6,13 @@ const getHeuristics = require('../index')
 
 getHeuristics({
   pkgPath: path.join(__dirname, 'package.json'),
-  configPath: path.join(__dirname, 'netlify.toml')
+  configPath: path.join(__dirname, 'netlify.toml'),
 }).then(info => {
   console.log(
     util.inspect(info, {
       showHidden: false,
       depth: null,
-      colors: true
-    })
+      colors: true,
+    }),
   )
 })
diff --git a/packages/build/tests/fixtures/local_bin_plugin/plugin.js b/packages/build/tests/fixtures/local_bin_plugin/plugin.js
index bb06669b5..fc3b83893 100644
--- a/packages/build/tests/fixtures/local_bin_plugin/plugin.js
+++ b/packages/build/tests/fixtures/local_bin_plugin/plugin.js
@@ -3,5 +3,5 @@ const execa = require('execa')
 module.exports = {
   async init() {
     await execa('atob', ['dGVzdA=='], { stdio: 'inherit' })
-  }
+  },
 }
diff --git a/packages/build/tests/fixtures/local_plugin/plugin.js b/packages/build/tests/fixtures/local_plugin/plugin.js
index c12dc5ba4..41eabc31b 100644
--- a/packages/build/tests/fixtures/local_plugin/plugin.js
+++ b/packages/build/tests/fixtures/local_plugin/plugin.js
@@ -1,5 +1,5 @@
 module.exports = {
   init() {
     console.log('test')
-  }
+  },
 }
diff --git a/packages/build/tests/fixtures/override/override.js b/packages/build/tests/fixtures/override/override.js
index 54408cb20..65d6e2292 100644
--- a/packages/build/tests/fixtures/override/override.js
+++ b/packages/build/tests/fixtures/override/override.js
@@ -1,5 +1,5 @@
 module.exports = {
   'netlify-plugin-example:init'() {
     console.log('Overridden init')
-  }
+  },
 }
diff --git a/packages/build/tests/fixtures/plugin_deps/plugin/main.js b/packages/build/tests/fixtures/plugin_deps/plugin/main.js
index 2f66a053e..bc5bfdeda 100644
--- a/packages/build/tests/fixtures/plugin_deps/plugin/main.js
+++ b/packages/build/tests/fixtures/plugin_deps/plugin/main.js
@@ -4,5 +4,5 @@ const avg = require('math-avg')
 module.exports = {
   init() {
     console.log(avg([1, 2]))
-  }
+  },
 }
diff --git a/packages/build/tests/fixtures/plugin_deps_already/plugin/main.js b/packages/build/tests/fixtures/plugin_deps_already/plugin/main.js
index 2f66a053e..bc5bfdeda 100644
--- a/packages/build/tests/fixtures/plugin_deps_already/plugin/main.js
+++ b/packages/build/tests/fixtures/plugin_deps_already/plugin/main.js
@@ -4,5 +4,5 @@ const avg = require('math-avg')
 module.exports = {
   init() {
     console.log(avg([1, 2]))
-  }
+  },
 }
diff --git a/packages/build/tests/fixtures/plugin_deps_no_package/plugin/main.js b/packages/build/tests/fixtures/plugin_deps_no_package/plugin/main.js
index 2f66a053e..bc5bfdeda 100644
--- a/packages/build/tests/fixtures/plugin_deps_no_package/plugin/main.js
+++ b/packages/build/tests/fixtures/plugin_deps_no_package/plugin/main.js
@@ -4,5 +4,5 @@ const avg = require('math-avg')
 module.exports = {
   init() {
     console.log(avg([1, 2]))
-  }
+  },
 }
diff --git a/packages/build/tests/fixtures/plugin_deps_yarn/plugin/main.js b/packages/build/tests/fixtures/plugin_deps_yarn/plugin/main.js
index 2f66a053e..bc5bfdeda 100644
--- a/packages/build/tests/fixtures/plugin_deps_yarn/plugin/main.js
+++ b/packages/build/tests/fixtures/plugin_deps_yarn/plugin/main.js
@@ -4,5 +4,5 @@ const avg = require('math-avg')
 module.exports = {
   init() {
     console.log(avg([1, 2]))
-  }
+  },
 }
diff --git a/packages/build/tests/helpers/main.js b/packages/build/tests/helpers/main.js
index cb582d09d..687703cd6 100644
--- a/packages/build/tests/helpers/main.js
+++ b/packages/build/tests/helpers/main.js
@@ -37,7 +37,7 @@ const NORMALIZE_REGEXPS = [
   // npm install logs
   [/added \d+ package.*/, 'added packages'],
   [/^npm ERR!.*/gm, 'npm ERR!'],
-  [/(npm ERR!\n)+/g, 'npm ERR!\n']
+  [/(npm ERR!\n)+/g, 'npm ERR!\n'],
 ]
 
 module.exports = { normalizeOutput }
diff --git a/packages/build/tests/main.test.js b/packages/build/tests/main.test.js
index ede7b3372..f0483aa47 100644
--- a/packages/build/tests/main.test.js
+++ b/packages/build/tests/main.test.js
@@ -32,7 +32,7 @@ test('--config with an invalid path', async t => {
 test('{env:...}', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/env/netlify.yml`, {
     env: { TEST: 'test' },
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
@@ -50,14 +50,14 @@ test('{context:...}', async t => {
 test('{context:...} with --context', async t => {
   const { all } = await execa.command(
     `${BINARY_PATH} --config ${FIXTURES_DIR}/context/netlify.yml --context development`,
-    { all: true }
+    { all: true },
   )
   t.snapshot(normalizeOutput(all))
 })
 
 test('{context:...} pointing to undefined path', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/context/netlify.yml --context invalid`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
@@ -79,7 +79,7 @@ test('Lifecycle commands can execute local binaries', async t => {
 
 test('Plugins can execute local binaries', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/local_bin_plugin/netlify.yml`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
@@ -97,30 +97,30 @@ test('--version', async t => {
 test('Can define options as environment variables', async t => {
   const { all } = await execa.command(BINARY_PATH, {
     env: {
-      NETLIFY_BUILD_CONFIG: `${FIXTURES_DIR}/empty/netlify.yml`
+      NETLIFY_BUILD_CONFIG: `${FIXTURES_DIR}/empty/netlify.yml`,
     },
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
 
 test('Can install plugins as Node modules', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/module_plugin/netlify.yml`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
 
 test('Reports missing plugins', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/missing_plugin/netlify.yml`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
 
 test('Can install local plugins', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/local_plugin/netlify.yml`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
@@ -134,7 +134,7 @@ test('Install local plugin dependencies: with npm', async t => {
 
 test('Install local plugin dependencies: with yarn', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/plugin_deps_yarn/netlify.yml`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 
@@ -143,21 +143,21 @@ test('Install local plugin dependencies: with yarn', async t => {
 
 test('Install local plugin dependencies: propagate errors', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/plugin_deps_error/netlify.yml`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
 
 test('Install local plugin dependencies: already installed', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/plugin_deps_already/netlify.yml`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
 
 test('Install local plugin dependencies: no package.json', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/plugin_deps_no_package/netlify.yml`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
@@ -166,14 +166,14 @@ test('Functions: simple setup', async t => {
   await del(`${FIXTURES_DIR}/functions/.netlify/functions/`)
 
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/functions/netlify.yml`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
 
 test('Functions: invalid source directory', async t => {
   const { all } = await execa.command(`${BINARY_PATH} --config ${FIXTURES_DIR}/functions_invalid/netlify.yml`, {
-    all: true
+    all: true,
   })
   t.snapshot(normalizeOutput(all))
 })
diff --git a/packages/config/tests/config.test.js b/packages/config/tests/config.test.js
index ffddfc43b..65768317b 100644
--- a/packages/config/tests/config.test.js
+++ b/packages/config/tests/config.test.js
@@ -11,11 +11,11 @@ test('Test TOML', async t => {
     build: {
       publish: 'dist',
       lifecycle: {
-        build: ['npm run build']
+        build: ['npm run build'],
       },
-      functions: 'functions'
+      functions: 'functions',
     },
-    plugins: {}
+    plugins: {},
   })
 })
 
@@ -26,11 +26,11 @@ test('Test YAML', async t => {
     build: {
       publish: 'dist',
       lifecycle: {
-        build: ['npm run build']
+        build: ['npm run build'],
       },
-      functions: 'functions'
+      functions: 'functions',
     },
-    plugins: {}
+    plugins: {},
   })
 })
 
@@ -41,10 +41,10 @@ test('Test JSON', async t => {
     build: {
       publish: 'dist',
       lifecycle: {
-        build: ['npm run build']
+        build: ['npm run build'],
       },
-      functions: 'functions'
+      functions: 'functions',
     },
-    plugins: {}
+    plugins: {},
   })
 })