Repository: netlify/build
Pull request #4020 (2022-01-10 18:02:21)

chore(deps): update dependency @netlify/eslint-config-node to ^4.1.0
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@netlify/eslint-config-node](https://togithub.com/netlify/eslint-config-node) | [`^4.0.8` -> `^4.1.0`](https://renovatebot.com/diffs/npm/@netlify%2feslint-config-node/4.0.8/4.1.0) | [![age](https://badges.renovateapi.com/packages/npm/@netlify%2feslint-config-node/4.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@netlify%2feslint-config-node/4.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@netlify%2feslint-config-node/4.1.0/compatibility-slim/4.0.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@netlify%2feslint-config-node/4.1.0/confidence-slim/4.0.8)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>netlify/eslint-config-node</summary>

### [`v4.1.0`](https://togithub.com/netlify/eslint-config-node/blob/HEAD/CHANGELOG.md#&#8203;410-httpsgithubcomnetlifyeslint-config-nodecomparev408v410-2022-01-10)

[Compare Source](https://togithub.com/netlify/eslint-config-node/compare/v4.0.8...v4.1.0)

##### Features

-   Enable a few more newer Node.js rules ([#&#8203;397](https://togithub.com/netlify/eslint-config-node/issues/397)) ([3367a21](https://togithub.com/netlify/eslint-config-node/commit/3367a21a02e2fb59a79089a9de416b1476ea0522))

##### Bug Fixes

-   **deps:** update dependency eslint-plugin-unicorn to v40 ([#&#8203;392](https://togithub.com/netlify/eslint-config-node/issues/392)) ([f81380d](https://togithub.com/netlify/eslint-config-node/commit/f81380d6b48c732b03ba448507edfc313e444eb2))

##### [4.0.8](https://togithub.com/netlify/eslint-config-node/compare/v4.0.7...v4.0.8) (2022-01-10)

##### Bug Fixes

-   downgrade eslint-plugin-promise to v5.2.0 ([#&#8203;401](https://togithub.com/netlify/eslint-config-node/issues/401)) ([1ea31bf](https://togithub.com/netlify/eslint-config-node/commit/1ea31bfc2b692a1ecd4e274d14a1cb03360b1823))

##### [4.0.7](https://togithub.com/netlify/eslint-config-node/compare/v4.0.6...v4.0.7) (2022-01-10)

##### Bug Fixes

-   **deps:** update dependency [@&#8203;commitlint/cli](https://togithub.com/commitlint/cli) to v16.0.2 ([#&#8203;404](https://togithub.com/netlify/eslint-config-node/issues/404)) ([7ab7698](https://togithub.com/netlify/eslint-config-node/commit/7ab76989a0cfd525a8f948b40fef7cd81c62a29c))
-   **deps:** update dependency eslint-plugin-ava to v13.2.0 ([#&#8203;405](https://togithub.com/netlify/eslint-config-node/issues/405)) ([bb0588e](https://togithub.com/netlify/eslint-config-node/commit/bb0588ed9b197c2e5e7f336a177095f76b21024c))
-   **deps:** update typescript-eslint monorepo to v5.9.0 ([#&#8203;406](https://togithub.com/netlify/eslint-config-node/issues/406)) ([baa55b8](https://togithub.com/netlify/eslint-config-node/commit/baa55b8c606d1844c92ae100eff9e982bef24676))

##### [4.0.6](https://togithub.com/netlify/eslint-config-node/compare/v4.0.5...v4.0.6) (2022-01-03)

##### Bug Fixes

-   disable no-await-in-loop ([#&#8203;395](https://togithub.com/netlify/eslint-config-node/issues/395)) ([0b9052f](https://togithub.com/netlify/eslint-config-node/commit/0b9052fdaf32554911d8548863e046276eb6d17f))

##### [4.0.5](https://togithub.com/netlify/eslint-config-node/compare/v4.0.4...v4.0.5) (2022-01-03)

##### Bug Fixes

-   **deps:** update dependency [@&#8203;babel/core](https://togithub.com/babel/core) to v7.16.7 ([#&#8203;387](https://togithub.com/netlify/eslint-config-node/issues/387)) ([254790c](https://togithub.com/netlify/eslint-config-node/commit/254790c4b06505bf14516a612b31fde451e4b2af))
-   **deps:** update dependency [@&#8203;commitlint/cli](https://togithub.com/commitlint/cli) to v16.0.1 ([#&#8203;388](https://togithub.com/netlify/eslint-config-node/issues/388)) ([56e0b8c](https://togithub.com/netlify/eslint-config-node/commit/56e0b8ceace70c31e0a3c470de4af94107279a45))
-   **deps:** update dependency eslint-plugin-import to v2.25.4 ([#&#8203;389](https://togithub.com/netlify/eslint-config-node/issues/389)) ([ffe4e09](https://togithub.com/netlify/eslint-config-node/commit/ffe4e09a7fb25a4c54901b154fe7081a3b237c84))
-   **deps:** update typescript-eslint monorepo to v5.8.1 ([#&#8203;390](https://togithub.com/netlify/eslint-config-node/issues/390)) ([39819e4](https://togithub.com/netlify/eslint-config-node/commit/39819e4297c798ac9ce78fbfa04f142fc82e17be))

##### [4.0.4](https://www.github.com/netlify/eslint-config-node/compare/v4.0.3...v4.0.4) (2021-12-27)

##### Bug Fixes

-   **deps:** update commitlint monorepo to v16 ([#&#8203;384](https://www.togithub.com/netlify/eslint-config-node/issues/384)) ([3f31939](https://www.github.com/netlify/eslint-config-node/commit/3f31939f794acdfc954dcc45cf33ae9b16df4137))

##### [4.0.3](https://www.github.com/netlify/eslint-config-node/compare/v4.0.2...v4.0.3) (2021-12-27)

##### Bug Fixes

-   **deps:** update dependency eslint-plugin-react to v7.28.0 ([#&#8203;382](https://www.togithub.com/netlify/eslint-config-node/issues/382)) ([bb5144d](https://www.github.com/netlify/eslint-config-node/commit/bb5144d97e3c190182629fe87f839b693c2ffb17))

##### [4.0.2](https://www.github.com/netlify/eslint-config-node/compare/v4.0.1...v4.0.2) (2021-12-20)

##### Bug Fixes

-   **deps:** update babel monorepo to v7.16.5 ([#&#8203;378](https://www.togithub.com/netlify/eslint-config-node/issues/378)) ([a49b0db](https://www.github.com/netlify/eslint-config-node/commit/a49b0db097a830b7c6e003b1c90d3132e15833cf))
-   **deps:** update dependency eslint-plugin-promise to v6 ([#&#8203;380](https://www.togithub.com/netlify/eslint-config-node/issues/380)) ([16257df](https://www.github.com/netlify/eslint-config-node/commit/16257dfc04e490fe7d6b6256e0dd97a103fc9885))
-   **deps:** update typescript-eslint monorepo to v5.7.0 ([#&#8203;379](https://www.togithub.com/netlify/eslint-config-node/issues/379)) ([7bd94de](https://www.github.com/netlify/eslint-config-node/commit/7bd94decdb0acc6aaccd121026ea798bf8b8ed45))

##### [4.0.1](https://www.github.com/netlify/eslint-config-node/compare/v4.0.0...v4.0.1) (2021-12-16)

##### Bug Fixes

-   linting `*.mjs`, `*.cjs`, `*.mts` and `*.cts` ([#&#8203;376](https://www.togithub.com/netlify/eslint-config-node/issues/376)) ([1c8845e](https://www.github.com/netlify/eslint-config-node/commit/1c8845e046792717316d5a235e9934790116a3ca))

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/netlify/build).


Patch:
diff --git a/package-lock.json b/package-lock.json
index dd9aef2e1..95c769397 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,7 +14,7 @@
       "devDependencies": {
         "@commitlint/cli": "^16.0.0",
         "@commitlint/config-conventional": "^16.0.0",
-        "@netlify/eslint-config-node": "^4.0.8",
+        "@netlify/eslint-config-node": "^4.1.0",
         "ava": "^3.15.0",
         "nyc": "^15.0.0",
         "tsd": "^0.19.0"
@@ -2220,9 +2220,9 @@
       }
     },
     "node_modules/@netlify/eslint-config-node": {
-      "version": "4.0.8",
-      "resolved": "https://registry.npmjs.org/@netlify/eslint-config-node/-/eslint-config-node-4.0.8.tgz",
-      "integrity": "sha512-DOP5TDrxOB9ydEcTB5Ghr2LmQXNj50QUXGTksH3zwOrDh0UvZMyevA30lANs7YlJUaZjYAcviF/u10AgVzGZ0A==",
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/@netlify/eslint-config-node/-/eslint-config-node-4.1.0.tgz",
+      "integrity": "sha512-7I+5Eli0IbLj+3flcxuOX5PyrApXicGAKohWKD7KCx/wSv2buN21kC0c1+Du8Uj5ykVCbHxfpwR59MnDNsZGBw==",
       "dev": true,
       "dependencies": {
         "@babel/core": "^7.13.8",
@@ -2247,7 +2247,7 @@
         "eslint-plugin-node": "^11.1.0",
         "eslint-plugin-promise": "^5.2.0",
         "eslint-plugin-react": "^7.21.5",
-        "eslint-plugin-unicorn": "^39.0.0",
+        "eslint-plugin-unicorn": "^40.0.0",
         "eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
         "execa": "^5.0.0",
         "husky": "^4.3.0",
@@ -6639,23 +6639,22 @@
       }
     },
     "node_modules/eslint-plugin-unicorn": {
-      "version": "39.0.0",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-39.0.0.tgz",
-      "integrity": "sha512-fd5RK2FtYjGcIx3wra7csIE/wkkmBo22T1gZtRTsLr1Mb+KsFKJ+JOdSqhHXQUrI/JTs/Mon64cEYzTgSCbltw==",
+      "version": "40.0.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-40.0.0.tgz",
+      "integrity": "sha512-5GRXISfBk8jMmYk1eeNDw8zSRnWTxBjWkzx2Prre6E2/yLu2twozZ3EomLWCBu9nWms/ZE361BItyMQwfnG1qA==",
       "dev": true,
       "dependencies": {
-        "@babel/helper-validator-identifier": "^7.14.9",
-        "ci-info": "^3.2.0",
+        "@babel/helper-validator-identifier": "^7.15.7",
+        "ci-info": "^3.3.0",
         "clean-regexp": "^1.0.0",
-        "eslint-template-visitor": "^2.3.2",
         "eslint-utils": "^3.0.0",
         "esquery": "^1.4.0",
-        "indent-string": "4",
+        "indent-string": "^4.0.0",
         "is-builtin-module": "^3.1.0",
         "lodash": "^4.17.21",
         "pluralize": "^8.0.0",
         "read-pkg-up": "^7.0.1",
-        "regexp-tree": "^0.1.23",
+        "regexp-tree": "^0.1.24",
         "safe-regex": "^2.1.1",
         "semver": "^7.3.5",
         "strip-indent": "^3.0.0"
@@ -6716,22 +6715,6 @@
         "node": ">=4.0"
       }
     },
-    "node_modules/eslint-template-visitor": {
-      "version": "2.3.2",
-      "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.3.2.tgz",
-      "integrity": "sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA==",
-      "dev": true,
-      "dependencies": {
-        "@babel/core": "^7.12.16",
-        "@babel/eslint-parser": "^7.12.16",
-        "eslint-visitor-keys": "^2.0.0",
-        "esquery": "^1.3.1",
-        "multimap": "^1.1.0"
-      },
-      "peerDependencies": {
-        "eslint": ">=7.0.0"
-      }
-    },
     "node_modules/eslint-utils": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
@@ -10283,12 +10266,6 @@
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
       "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
     },
-    "node_modules/multimap": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz",
-      "integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==",
-      "dev": true
-    },
     "node_modules/nanoid": {
       "version": "3.1.30",
       "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz",
@@ -18420,9 +18397,9 @@
       "integrity": "sha512-tiKmDcHM2riSVN79c0mJY/67EBDafXQAMitHuLiCDAMdtz3kfv+NqdVG5krgf5lWR8Uf8AeZrUW5Q9RP25REvw=="
     },
     "@netlify/eslint-config-node": {
-      "version": "4.0.8",
-      "resolved": "https://registry.npmjs.org/@netlify/eslint-config-node/-/eslint-config-node-4.0.8.tgz",
-      "integrity": "sha512-DOP5TDrxOB9ydEcTB5Ghr2LmQXNj50QUXGTksH3zwOrDh0UvZMyevA30lANs7YlJUaZjYAcviF/u10AgVzGZ0A==",
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/@netlify/eslint-config-node/-/eslint-config-node-4.1.0.tgz",
+      "integrity": "sha512-7I+5Eli0IbLj+3flcxuOX5PyrApXicGAKohWKD7KCx/wSv2buN21kC0c1+Du8Uj5ykVCbHxfpwR59MnDNsZGBw==",
       "dev": true,
       "requires": {
         "@babel/core": "^7.13.8",
@@ -18447,7 +18424,7 @@
         "eslint-plugin-node": "^11.1.0",
         "eslint-plugin-promise": "^5.2.0",
         "eslint-plugin-react": "^7.21.5",
-        "eslint-plugin-unicorn": "^39.0.0",
+        "eslint-plugin-unicorn": "^40.0.0",
         "eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
         "execa": "^5.0.0",
         "husky": "^4.3.0",
@@ -21860,23 +21837,22 @@
       }
     },
     "eslint-plugin-unicorn": {
-      "version": "39.0.0",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-39.0.0.tgz",
-      "integrity": "sha512-fd5RK2FtYjGcIx3wra7csIE/wkkmBo22T1gZtRTsLr1Mb+KsFKJ+JOdSqhHXQUrI/JTs/Mon64cEYzTgSCbltw==",
+      "version": "40.0.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-40.0.0.tgz",
+      "integrity": "sha512-5GRXISfBk8jMmYk1eeNDw8zSRnWTxBjWkzx2Prre6E2/yLu2twozZ3EomLWCBu9nWms/ZE361BItyMQwfnG1qA==",
       "dev": true,
       "requires": {
-        "@babel/helper-validator-identifier": "^7.14.9",
-        "ci-info": "^3.2.0",
+        "@babel/helper-validator-identifier": "^7.15.7",
+        "ci-info": "^3.3.0",
         "clean-regexp": "^1.0.0",
-        "eslint-template-visitor": "^2.3.2",
         "eslint-utils": "^3.0.0",
         "esquery": "^1.4.0",
-        "indent-string": "4",
+        "indent-string": "^4.0.0",
         "is-builtin-module": "^3.1.0",
         "lodash": "^4.17.21",
         "pluralize": "^8.0.0",
         "read-pkg-up": "^7.0.1",
-        "regexp-tree": "^0.1.23",
+        "regexp-tree": "^0.1.24",
         "safe-regex": "^2.1.1",
         "semver": "^7.3.5",
         "strip-indent": "^3.0.0"
@@ -21923,19 +21899,6 @@
         }
       }
     },
-    "eslint-template-visitor": {
-      "version": "2.3.2",
-      "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.3.2.tgz",
-      "integrity": "sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA==",
-      "dev": true,
-      "requires": {
-        "@babel/core": "^7.12.16",
-        "@babel/eslint-parser": "^7.12.16",
-        "eslint-visitor-keys": "^2.0.0",
-        "esquery": "^1.3.1",
-        "multimap": "^1.1.0"
-      }
-    },
     "eslint-utils": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
@@ -24511,12 +24474,6 @@
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
       "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
     },
-    "multimap": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz",
-      "integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==",
-      "dev": true
-    },
     "nanoid": {
       "version": "3.1.30",
       "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz",
diff --git a/package.json b/package.json
index 324b674fe..18d6200e1 100644
--- a/package.json
+++ b/package.json
@@ -82,7 +82,7 @@
   "devDependencies": {
     "@commitlint/cli": "^16.0.0",
     "@commitlint/config-conventional": "^16.0.0",
-    "@netlify/eslint-config-node": "^4.0.8",
+    "@netlify/eslint-config-node": "^4.1.0",
     "ava": "^3.15.0",
     "nyc": "^15.0.0",
     "tsd": "^0.19.0"
diff --git a/packages/build/src/error/handle.js b/packages/build/src/error/handle.js
index bf5d4dea5..a48a4a47d 100644
--- a/packages/build/src/error/handle.js
+++ b/packages/build/src/error/handle.js
@@ -51,7 +51,7 @@ const isCancelCrash = async function (error) {
     const cwd = getCwd()
     return !(await pathExists(cwd))
     // `process.cwd()` fails when the current directory does not exist
-  } catch (error_) {
+  } catch {
     return true
   }
 }
diff --git a/packages/build/src/error/monitor/report.js b/packages/build/src/error/monitor/report.js
index f5b5ca1ee..18c43dd62 100644
--- a/packages/build/src/error/monitor/report.js
+++ b/packages/build/src/error/monitor/report.js
@@ -102,7 +102,7 @@ const reportError = async function ({ errorMonitor, error, logs, testOpts, event
   try {
     await promisify(errorMonitor.notify)(error, (event) => onError(event, eventProps))
     // Failsafe
-  } catch (error_) {
+  } catch {
     log(logs, `Error monitor could not notify\n${error.stack}`)
   }
 }
diff --git a/packages/build/src/error/parse/clean_stack.js b/packages/build/src/error/parse/clean_stack.js
index 4544fbfd7..9ea5c059d 100644
--- a/packages/build/src/error/parse/clean_stack.js
+++ b/packages/build/src/error/parse/clean_stack.js
@@ -51,7 +51,7 @@ const cleanStackLine = function (lines, line) {
 const getCwd = function () {
   try {
     return cwd()
-  } catch (error) {
+  } catch {
     return ''
   }
 }
diff --git a/packages/build/src/log/logger.js b/packages/build/src/log/logger.js
index 721881164..1e74599d9 100644
--- a/packages/build/src/log/logger.js
+++ b/packages/build/src/log/logger.js
@@ -45,7 +45,7 @@ const serializeIndentedArray = function (array) {
 }
 
 const serializeIndentedItem = function (item) {
-  return indentString(item, INDENT_SIZE + 1).trimLeft()
+  return indentString(item, INDENT_SIZE + 1).trimStart()
 }
 
 export const logError = function (logs, string, opts) {
diff --git a/packages/build/src/log/messages/core_steps.js b/packages/build/src/log/messages/core_steps.js
index 9981f0d72..90c90d999 100644
--- a/packages/build/src/log/messages/core_steps.js
+++ b/packages/build/src/log/messages/core_steps.js
@@ -21,7 +21,7 @@ export const logBundleResults = ({ logs, results = [] }) => {
     ({ bundler, bundlerWarnings }) => bundler === 'esbuild' && bundlerWarnings && bundlerWarnings.length !== 0,
   )
   const modulesWithDynamicImports = [
-    ...new Set(results.map((result) => result.nodeModulesWithDynamicImports || []).flat()),
+    ...new Set(results.flatMap((result) => result.nodeModulesWithDynamicImports || [])),
   ]
 
   if (resultsWithErrors.length !== 0) {
diff --git a/packages/build/src/log/serialize.js b/packages/build/src/log/serialize.js
index dc27676ee..7c5e55711 100644
--- a/packages/build/src/log/serialize.js
+++ b/packages/build/src/log/serialize.js
@@ -1,7 +1,7 @@
 import { dump } from 'js-yaml'
 
 export const serializeObject = function (object) {
-  return dump(object, { noRefs: true, sortKeys: true, lineWidth: Number.POSITIVE_INFINITY }).trimRight()
+  return dump(object, { noRefs: true, sortKeys: true, lineWidth: Number.POSITIVE_INFINITY }).trimEnd()
 }
 
 export const serializeArray = function (array) {
diff --git a/packages/build/src/log/stream.js b/packages/build/src/log/stream.js
index 251f68dcb..5db088fd3 100644
--- a/packages/build/src/log/stream.js
+++ b/packages/build/src/log/stream.js
@@ -76,7 +76,7 @@ const pushOutputToLogs = function (childProcess, logs) {
 }
 
 const logsListener = function (logs, chunk) {
-  logs.push(chunk.toString().trimRight())
+  logs.push(chunk.toString().trimEnd())
 }
 
 const unpushOutputToLogs = function (childProcess, logs, { stdoutListener, stderrListener }) {
diff --git a/packages/build/src/plugins/compatibility.js b/packages/build/src/plugins/compatibility.js
index b88a04c66..7d0b294bd 100644
--- a/packages/build/src/plugins/compatibility.js
+++ b/packages/build/src/plugins/compatibility.js
@@ -109,7 +109,7 @@ const siteDependencyTest = async function ({ dependencyName, allowedVersion, sit
     const packageJsonPath = await resolvePath(`${dependencyName}/package.json`, buildDir)
     const { version } = await importJsonFile(packageJsonPath)
     return semver.satisfies(version, allowedVersion)
-  } catch (error) {
+  } catch {
     return false
   }
 }
diff --git a/packages/build/src/utils/json.js b/packages/build/src/utils/json.js
index 67adc856c..dd515a379 100644
--- a/packages/build/src/utils/json.js
+++ b/packages/build/src/utils/json.js
@@ -6,7 +6,7 @@ const ROOT_PACKAGE_JSON_PATH = fileURLToPath(new URL('../../package.json', impor
 // TODO: Replace with dynamic `import()` once it is supported without
 // experimental flags
 export const importJsonFile = async function (filePath) {
-  const fileContents = await fs.readFile(filePath, 'utf8')
+  const fileContents = await fs.readFile(filePath)
   return JSON.parse(fileContents)
 }
 
diff --git a/packages/build/src/utils/package.js b/packages/build/src/utils/package.js
index 27f828a1b..2209c6138 100644
--- a/packages/build/src/utils/package.js
+++ b/packages/build/src/utils/package.js
@@ -19,5 +19,5 @@ const getPackageObj = async function ({ cwd, normalize = true }) {
     return await readPkgUp({ cwd, normalize })
     // If the `package.json` is invalid and `normalize` is `true`, an error is
     // thrown. We return `undefined` then.
-  } catch (error) {}
+  } catch {}
 }
diff --git a/packages/build/src/utils/resolve.js b/packages/build/src/utils/resolve.js
index a66ab9794..a55ff7d7f 100644
--- a/packages/build/src/utils/resolve.js
+++ b/packages/build/src/utils/resolve.js
@@ -23,7 +23,7 @@ export const resolvePath = async function (path, basedir) {
     // Fallback.
     // `resolve` sometimes gives unhelpful error messages.
     // https://github.com/browserify/resolve/issues/223
-  } catch (error) {
+  } catch {
     return require.resolve(path, { paths: [basedir] })
   }
 }
diff --git a/packages/cache-utils/src/fs.js b/packages/cache-utils/src/fs.js
index 0e8a2a748..dc69dd72e 100644
--- a/packages/cache-utils/src/fs.js
+++ b/packages/cache-utils/src/fs.js
@@ -59,5 +59,5 @@ const getSrcGlob = async function (src) {
 const getStat = async function (src) {
   try {
     return await pStat(src)
-  } catch (error) {}
+  } catch {}
 }
diff --git a/packages/cache-utils/src/utils/cwd.js b/packages/cache-utils/src/utils/cwd.js
index 93cc486d4..e6c3d4d48 100644
--- a/packages/cache-utils/src/utils/cwd.js
+++ b/packages/cache-utils/src/utils/cwd.js
@@ -13,7 +13,7 @@ export const safeGetCwd = async function (cwdOpt) {
     }
 
     return cwd
-  } catch (error) {
+  } catch {
     return ''
   }
 }
diff --git a/packages/config/src/env/git.js b/packages/config/src/env/git.js
index 94b47665b..ea8bb920e 100644
--- a/packages/config/src/env/git.js
+++ b/packages/config/src/env/git.js
@@ -19,5 +19,5 @@ const git = async function (args, cwd) {
   try {
     const { stdout } = await execa('git', args, { cwd })
     return stdout
-  } catch (error) {}
+  } catch {}
 }
diff --git a/packages/config/src/log/serialize.js b/packages/config/src/log/serialize.js
index 10e2a6874..58ac2e9d7 100644
--- a/packages/config/src/log/serialize.js
+++ b/packages/config/src/log/serialize.js
@@ -1,5 +1,5 @@
 import { dump } from 'js-yaml'
 
 export const serializeObject = function (object) {
-  return dump(object, { noRefs: true, sortKeys: true, lineWidth: Number.POSITIVE_INFINITY }).trimRight()
+  return dump(object, { noRefs: true, sortKeys: true, lineWidth: Number.POSITIVE_INFINITY }).trimEnd()
 }
diff --git a/packages/config/src/mutations/update.js b/packages/config/src/mutations/update.js
index dd326554b..efb015e9c 100644
--- a/packages/config/src/mutations/update.js
+++ b/packages/config/src/mutations/update.js
@@ -110,7 +110,7 @@ const backupFile = async function (original, backup) {
 const deleteNoError = async (path) => {
   try {
     await pUnlink(path)
-  } catch (_) {}
+  } catch {}
 }
 
 const copyOrDelete = async function (src, dest) {
diff --git a/packages/config/src/options/branch.js b/packages/config/src/options/branch.js
index c84f0fc44..4dd11291b 100644
--- a/packages/config/src/options/branch.js
+++ b/packages/config/src/options/branch.js
@@ -28,7 +28,7 @@ const getGitBranch = async function (repositoryRoot, gitRef) {
   try {
     const { stdout } = await execa.command(`git rev-parse --abbrev-ref ${gitRef}`, { cwd: repositoryRoot })
     return stdout
-  } catch (error) {}
+  } catch {}
 }
 
 const FALLBACK_BRANCH = 'master'
diff --git a/packages/config/src/validate/validations.js b/packages/config/src/validate/validations.js
index e136bead1..16ad89f70 100644
--- a/packages/config/src/validate/validations.js
+++ b/packages/config/src/validate/validations.js
@@ -16,7 +16,7 @@ const isValidCronExpression = (cron) => {
   try {
     CronParser.parseExpression(cron)
     return true
-  } catch (error) {
+  } catch {
     return false
   }
 }
diff --git a/packages/git-utils/src/exec.js b/packages/git-utils/src/exec.js
index ec463b08e..ab9e066f8 100644
--- a/packages/git-utils/src/exec.js
+++ b/packages/git-utils/src/exec.js
@@ -38,7 +38,7 @@ const getCwdValue = function (cwd) {
 
   try {
     return process.cwd()
-  } catch (error) {
+  } catch {
     throw new Error('Current directory does not exist')
   }
 }


Test patch:
diff --git a/packages/build/tests/helpers/dir.js b/packages/build/tests/helpers/dir.js
index ee3fb897c..f10db2a8e 100644
--- a/packages/build/tests/helpers/dir.js
+++ b/packages/build/tests/helpers/dir.js
@@ -30,5 +30,5 @@ const createGit = async function (cwd, git) {
 export const removeDir = async function (dir) {
   try {
     await del(dir, { force: true })
-  } catch (error) {}
+  } catch {}
 }
diff --git a/packages/build/tests/helpers/server.js b/packages/build/tests/helpers/server.js
index 3c8289be5..97ba402cc 100644
--- a/packages/build/tests/helpers/server.js
+++ b/packages/build/tests/helpers/server.js
@@ -70,7 +70,7 @@ const getRequestBody = async function (req) {
   const rawBody = await getStream(req)
   try {
     return JSON.parse(rawBody)
-  } catch (error) {
+  } catch {
     return rawBody
   }
 }
diff --git a/packages/config/tests/helpers/main.js b/packages/config/tests/helpers/main.js
index 2f2207f4f..f285354cf 100644
--- a/packages/config/tests/helpers/main.js
+++ b/packages/config/tests/helpers/main.js
@@ -8,7 +8,7 @@ export const getFixtureConfig = async function (t, fixtureName, opts) {
   const { returnValue } = await runFixtureConfig(t, fixtureName, { snapshot: false, ...opts })
   try {
     return JSON.parse(returnValue)
-  } catch (error) {
+  } catch {
     return returnValue
   }
 }