Lint Code [skip actions]

This commit is contained in:
github-actions 2023-05-13 03:18:45 +00:00
parent 8c0045a8d7
commit 98b834cdcd
4 changed files with 6 additions and 19 deletions

View File

@ -70,9 +70,7 @@ export function getCommands(): CommandDump {
* Fetches and lists all the commands in the file. * Fetches and lists all the commands in the file.
*/ */
export function listCommands(): Command[] { export function listCommands(): Command[] {
return Object.values(getCommands()) return Object.values(getCommands()).sort((a, b) => a.name[0].localeCompare(b.name[0]));
.sort((a, b) =>
a.name[0].localeCompare(b.name[0]));
} }
/** /**
@ -112,9 +110,7 @@ export function getAvatars(): AvatarDump {
* Fetches and lists all the avatars in the file. * Fetches and lists all the avatars in the file.
*/ */
export function listAvatars(): Avatar[] { export function listAvatars(): Avatar[] {
return Object.values(getAvatars()) return Object.values(getAvatars()).sort((a, b) => a.name.localeCompare(b.name));
.sort((a, b) =>
a.name.localeCompare(b.name));
} }
/** /**

View File

@ -41,10 +41,7 @@ class HomePage extends React.Component<any, any> {
<p>trademarks and copyrights of HoYoverse.</p> <p>trademarks and copyrights of HoYoverse.</p>
</div> </div>
<div <div className={"HomePage_Discord"} onClick={() => openUrl("https://discord.gg/grasscutter")}>
className={"HomePage_Discord"}
onClick={() => openUrl("https://discord.gg/grasscutter")}
>
<DiscordLogo /> <DiscordLogo />
<p>Join the Community!</p> <p>Join the Community!</p>
</div> </div>

View File

@ -45,7 +45,7 @@ class ScenesPage extends React.PureComponent {
if (connected) { if (connected) {
await teleportTo(scene); await teleportTo(scene);
} else { } else {
await copyToClipboard(action.teleport(scene)) await copyToClipboard(action.teleport(scene));
} }
} }
@ -61,9 +61,7 @@ class ScenesPage extends React.PureComponent {
title={scene.identifier} title={scene.identifier}
alternate={`ID: ${scene.id} | ${sceneTypeToString(scene.type)}`} alternate={`ID: ${scene.id} | ${sceneTypeToString(scene.type)}`}
button={ button={
<button className={"ScenesPage_Button"} <button className={"ScenesPage_Button"} onClick={() => this.teleport(scene.id)}>
onClick={() => this.teleport(scene.id)}
>
Teleport Teleport
</button> </button>
} }

View File

@ -49,11 +49,7 @@ class Character extends React.PureComponent<IProps> {
/> />
<div className={"Character_Label"}> <div className={"Character_Label"}>
<p <p style={{ fontSize: characterName.length >= 12 ? 13 : 17 }}>{characterName}</p>
style={{ fontSize: characterName.length >= 12 ? 13 : 17 }}
>
{characterName}
</p>
</div> </div>
</div> </div>
); );