Merged in fix/3697-prettier-configs (pull request #3396)

fix(SW-3691): Setup one prettier config for whole repo

* Setup prettierrc in root and remove other configs


Approved-by: Joakim Jäderberg
Approved-by: Linus Flood
This commit is contained in:
Rasmus Langvad
2026-01-07 12:45:50 +00:00
parent 932413412b
commit d0546926a9
500 changed files with 18367 additions and 18419 deletions

View File

@@ -1,5 +1,5 @@
import { promises as fs } from 'node:fs'
import * as path from 'node:path'
import { promises as fs } from "node:fs"
import * as path from "node:path"
async function ensureDir(dir: string): Promise<void> {
await fs.mkdir(dir, { recursive: true })
@@ -22,20 +22,20 @@ async function copyDir(src: string, dest: string): Promise<void> {
export async function copyFilesCLI(): Promise<void> {
const args = process.argv.slice(2)
const showHelp = args.includes('-h') || args.includes('--help')
const showHelp = args.includes("-h") || args.includes("--help")
const sourceArg = args[0]
const destArg = args[1]
console.log('sourceArg:', sourceArg, 'destArg:', destArg)
console.log("sourceArg:", sourceArg, "destArg:", destArg)
if (showHelp || !sourceArg || !destArg) {
console.error(
[
'Usage: tsx scripts/copyFiles.ts <source-path> <destination-path>',
'',
'Copies all files from <source-path> into <destination-path>.',
'Examples:',
' tsx scripts/copyFiles.ts static/fonts dist/fonts',
].join('\n')
"Usage: tsx scripts/copyFiles.ts <source-path> <destination-path>",
"",
"Copies all files from <source-path> into <destination-path>.",
"Examples:",
" tsx scripts/copyFiles.ts static/fonts dist/fonts",
].join("\n")
)
process.exit(showHelp ? 0 : 1)
}
@@ -45,8 +45,8 @@ export async function copyFilesCLI(): Promise<void> {
// Prevent copying into source or a parent of source
const rel = path.relative(src, dest)
if (!rel || !rel.startsWith('..')) {
console.error('Destination must not be inside the source fonts directory.')
if (!rel || !rel.startsWith("..")) {
console.error("Destination must not be inside the source fonts directory.")
process.exit(1)
}