Sets prettier to run on the repo (#91379)

## About The Pull Request
Prettier (an auto formatter) is set to only run within the tgui folder
currently. This removes that limitation, allowing it to automatically
format all supported files in the repo (.js, .html, .yml
[etc](https://prettier.io/docs/))

I made a few exceptions for bundled and generated files
## Why It's Good For The Game
I'm of the opinion that code should look uniform and am lazy enough to
want CTRL-S to format files without having to think beyond that
## Changelog
This commit is contained in:
Jeremiah
2025-05-29 21:23:59 -07:00
committed by GitHub
parent ea0d60aecb
commit 9db2f6916b
419 changed files with 7001 additions and 6703 deletions
@@ -16,15 +16,17 @@ function escapeRegex(string) {
}
export async function removeGuideComments({ github, context }) {
const originalBody = (await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
})).data.body;
const originalBody = (
await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
})
).data.body;
if (!originalBody) {
console.log("PR body is empty, skipping...");
return;
console.log("PR body is empty, skipping...");
return;
}
let newBody = originalBody;
@@ -32,7 +34,7 @@ export async function removeGuideComments({ github, context }) {
for (const comment of comments) {
newBody = newBody.replace(
new RegExp(`^\\s*${escapeRegex(comment)}\\s*`, "gm"),
"\n"
"\n",
);
}