Set up prettier

This commit is contained in:
hexaheximal 2025-07-30 11:29:36 -04:00
commit 7c4ba81ef3
Signed by: hexaheximal
GPG key ID: 66512C568C93CD3D
7 changed files with 4953 additions and 49 deletions

6
.prettierrc Normal file
View file

@ -0,0 +1,6 @@
{
"plugins": ["prettier-plugin-astro"],
"tabWidth": 4,
"semi": false,
"overrides": [{ "files": "*.astro", "options": { "parser": "astro" } }]
}

4896
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -9,9 +9,11 @@
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "devDependencies": {
"@astrojs/starlight": "^0.34.3",
"astro": "^5.1.8", "astro": "^5.1.8",
"prettier": "^3.6.2",
"prettier-plugin-astro": "^0.14.1",
"sharp": "^0.33.5", "sharp": "^0.33.5",
"starlight": "^0.3.9", "starlight": "^0.3.9"
"@astrojs/starlight": "^0.34.3"
} }
} }

View file

@ -36,7 +36,7 @@ import "../styles/login.css"
const params = new URLSearchParams(window.location.search) const params = new URLSearchParams(window.location.search)
for (const name of ["redirect_uri", "state", "nonce"]) { for (const name of ["redirect_uri", "state", "nonce"]) {
const input = document.querySelector( const input = document.querySelector(
`input[name="${name}"]` `input[name="${name}"]`,
) as HTMLInputElement ) as HTMLInputElement
if (input && params.has(name)) input.value = params.get(name)! if (input && params.has(name)) input.value = params.get(name)!
} }
@ -72,7 +72,7 @@ import "../styles/login.css"
identifier: { type: "m.id.user", user: username }, identifier: { type: "m.id.user", user: username },
password, password,
}), }),
} },
) )
if (!res.ok) { if (!res.ok) {
@ -82,12 +82,12 @@ import "../styles/login.css"
const data = await res.json() const data = await res.json()
const id = form.querySelector( const id = form.querySelector(
'input[name="user_id"]' 'input[name="user_id"]',
) as HTMLInputElement ) as HTMLInputElement
id.value = data.user_id id.value = data.user_id
const token = form.querySelector( const token = form.querySelector(
'input[name="access_token"]' 'input[name="access_token"]',
) as HTMLInputElement ) as HTMLInputElement
token.value = data.access_token token.value = data.access_token