From 5fab66444fb76f2d96b6a91f789db3da305bf4af Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 2 Oct 2024 00:16:20 +0200 Subject: [PATCH] chore: fix husky --- .config/dotnet-tools.json | 6 ++---- .husky/task-runner.json | 9 ++------- migrators/NetImporter/ImportUser.cs | 8 ++++---- package.json | 2 +- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index e6df774..4a287b1 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -4,10 +4,8 @@ "tools": { "husky": { "version": "0.7.1", - "commands": [ - "husky" - ], + "commands": ["husky"], "rollForward": false } } -} \ No newline at end of file +} diff --git a/.husky/task-runner.json b/.husky/task-runner.json index bb845ca..8ebba21 100644 --- a/.husky/task-runner.json +++ b/.husky/task-runner.json @@ -4,18 +4,13 @@ { "name": "run-prettier", "command": "yarn", - "args": [ - "format", - "${staged}" - ], + "args": ["format"], "pathMode": "absolute" }, { "name": "dotnet-format", "command": "dotnet", - "args": [ - "format" - ] + "args": ["format"] } ] } diff --git a/migrators/NetImporter/ImportUser.cs b/migrators/NetImporter/ImportUser.cs index 3524fad..9547980 100644 --- a/migrators/NetImporter/ImportUser.cs +++ b/migrators/NetImporter/ImportUser.cs @@ -112,12 +112,12 @@ public static class Users foreach (var field in oldUser.Fields ?? []) { var entries = field.Entries.Select(entry => new FieldEntry - { - Value = entry.Value, - Status = prefMapping.TryGetValue(entry.Status, out var newStatus) + { + Value = entry.Value, + Status = prefMapping.TryGetValue(entry.Status, out var newStatus) ? newStatus.ToString() : entry.Status, - }) + }) .ToList(); user.Fields.Add(new Field diff --git a/package.json b/package.json index 51b5b54..4c05b19 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,6 @@ }, "scripts": { "dev": "concurrently -n .net,node,rate -c magenta,yellow,blue -i 'cd Foxnouns.Backend && dotnet watch --no-hot-reload' 'cd Foxnouns.Frontend && yarn dev' 'cd rate && go run -v .'", - "format": "cd frontend && yarn format -w" + "format": "cd Foxnouns.Frontend && yarn format" } }