trakman icon indicating copy to clipboard operation
trakman copied to clipboard

Use formatter on Codebase

Open AroPix opened this issue 3 months ago • 3 comments

The codebase has very weird formatting and it's very painful coding with it when using a IDE like IntelliJ.

Maybe using a formatter to use a standard format might be nice?

AroPix avatar Aug 20 '25 19:08 AroPix

we used to run npx standard before every commit back in 2022, but that practice went out the window pretty early on. i think its a decent idea overall because generally it does appear that theres no defined formatting in the project whatsoever. i would personally go for prettier because thats what i use in non-trakman related js projects, but would need @lythx and @felacek to agree.

wsrvn avatar Aug 20 '25 20:08 wsrvn

The problem with formatters is that everyone has a different idea of how to do it, @wsrvn and I set up roughly the same guidelines in our IDEs (I use IntelliJ, too) a while ago, but that doesn't mean we always use them for the entire file (as that would clutter up the commit). I can try making a prettifier config but it'd be up to everyone to actually use it (unless we make it part of the pipeline somehow, may be possible, I can look into it)

felacek avatar Aug 22 '25 09:08 felacek

I can try making a prettifier config but it'd be up to everyone to actually use it

both vscode and intellij should be able to read the .prettierrc file in the project root and apply the settings from that i believe?

wsrvn avatar Aug 22 '25 10:08 wsrvn