From 74a03732de284ca35a7a58298fd8a70acc3a364b Mon Sep 17 00:00:00 2001 From: jhchabran Date: Thu, 20 Jun 2024 11:49:39 +0000 Subject: [PATCH] squash! Prettier --- src/scripts/generate-redirects.mjs | 4 +++- src/scripts/redirects.mjs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scripts/generate-redirects.mjs b/src/scripts/generate-redirects.mjs index 99b7e1fdb141..7e379b34067c 100644 --- a/src/scripts/generate-redirects.mjs +++ b/src/scripts/generate-redirects.mjs @@ -7,7 +7,9 @@ import fs from 'fs/promises' import redirects from './redirects.mjs' -const redirectLines = (await redirects()).map((entry) => `${entry.source} ${entry.destination}${entry.force ? ' 301!' : ''}`).join('\n') +const redirectLines = (await redirects()) + .map(entry => `${entry.source} ${entry.destination}${entry.force ? ' 301!' : ''}`) + .join('\n') const lines = `\n# Generated by generate-redirects.mjs from Git history\n${redirectLines}\n` console.log('Redirects:\n', lines) diff --git a/src/scripts/redirects.mjs b/src/scripts/redirects.mjs index 26ec59f835a1..d3bcc9c855fd 100644 --- a/src/scripts/redirects.mjs +++ b/src/scripts/redirects.mjs @@ -42,7 +42,7 @@ async function readNotionMigrationRedirects() { // To go around that, we add a new field 'force' that the script that // generate the final _redirects file used by Netlify uses to append // 301! on that entry, effectively forcing the redirection. - for ( const entry of data.redirections ) { + for (const entry of data.redirections) { entry.force = true } return data