-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoformatting #21
Autoformatting #21
Conversation
594d75f
to
dc18757
Compare
dc18757
to
50dbab4
Compare
PanoramaCastVoteNo: () => void; | ||
PanoramaCastVoteYes: () => void; | ||
RemoveStyle: (cls: string) => void; | ||
RemoveStyleFromEachChild: (cls: string) => void; | ||
ResetCarouselMouseWheelCounts: () => void; | ||
ScrollPanelDown: () => void; | ||
ScrollPanelLeft: () => void; | ||
ScrollPanelRight: () => void; | ||
ScrollPanelUp: () => void; | ||
ScrollToBottom: () => void; | ||
ScrollToTop: () => void; | ||
SetCarouselSelectedChild: (panel: Panel) => void; | ||
SetChildPanelsSelected: (selected: boolean) => void; | ||
SetInputFocus: () => void; | ||
SetPanelEnabled: (enabled: boolean) => void; | ||
SetPanelSelected: (selected: boolean) => void; | ||
SwitchStyle: (slot: string, cls: string) => void; | ||
TogglePanelSelected: () => void; | ||
ToggleStyle: (cls: string) => void; | ||
TriggerStyle: (cls: string) => void; | ||
UpdateFocusAndDirtyChildStyles: () => void; | ||
} | ||
|
||
interface GlobalEventNameMap { | ||
'AsyncEvent': (delay: duration, eventToFire: string) => void, | ||
'MainMenuResumeGame': () => void, | ||
'MainMenuPauseGame': () => void, | ||
'ShowPauseMenu': () => void, | ||
'HidePauseMenu': () => void, | ||
'ShowMainMenu': () => void, | ||
'HideMainMenu': () => void, | ||
'HudProcessInput': () => void, | ||
'HudThink': () => void, | ||
'ShowIntroMovie': () => void, | ||
'HideIntroMovie': () => void, | ||
'DemoPlaybackControl': (str: string, flt: float) => void, | ||
'Drawer_ExtendAndNavigateToTab': (tabid: string) => void, | ||
'Drawer_NavigateToTab': (tabid: string) => void, | ||
'Drawer_UpdateLobbyButton': (imgsrc: string, playercount: unknown) => void, | ||
'GameEventFired': (event: string) => void, | ||
'HideContentPanel': () => void, | ||
'LayoutReloaded': () => void, | ||
'MainMenuTabHidden': (tabid: string) => void, | ||
'MainMenuTabShown': (tabid: string) => void, | ||
'PageDown': () => void, | ||
'PageLeft': () => void, | ||
'PageRight': () => void, | ||
'PageUp': () => void, | ||
'PanoramaGameTimeJumpEvent': (time: duration) => void, | ||
'ReloadBackground': () => void, | ||
'ScrollDown': () => void, | ||
'ScrollLeft': () => void, | ||
'ScrollRight': () => void, | ||
'ScrollUp': () => void, | ||
'SettingsNavigateToPanel': (category: string, panel: Panel) => void, | ||
'ShowCenterPrintText': (message: string, priority: unknown) => void, | ||
'ShowContentPanel': () => void, | ||
'ShowVoteContextMenu': () => void, | ||
'StaticHudMenu_EntrySelected': (panel: Panel) => void, | ||
'UnloadLoadingScreenAndReinit': () => void, | ||
'AchievementInfoLoaded': () => void, | ||
'AchievementEarned': (player_index: number, achievement_index: number) => void, | ||
AsyncEvent: (delay: duration, eventToFire: string) => void; | ||
MainMenuResumeGame: () => void; | ||
MainMenuPauseGame: () => void; | ||
ShowPauseMenu: () => void; | ||
HidePauseMenu: () => void; | ||
ShowMainMenu: () => void; | ||
HideMainMenu: () => void; | ||
HudProcessInput: () => void; | ||
HudThink: () => void; | ||
ShowIntroMovie: () => void; | ||
HideIntroMovie: () => void; | ||
DemoPlaybackControl: (str: string, flt: float) => void; | ||
Drawer_ExtendAndNavigateToTab: (tabid: string) => void; | ||
Drawer_NavigateToTab: (tabid: string) => void; | ||
Drawer_UpdateLobbyButton: (imgsrc: string, playercount: unknown) => void; | ||
GameEventFired: (event: string) => void; | ||
HideContentPanel: () => void; | ||
LayoutReloaded: () => void; | ||
MainMenuTabHidden: (tabid: string) => void; | ||
MainMenuTabShown: (tabid: string) => void; | ||
PageDown: () => void; | ||
PageLeft: () => void; | ||
PageRight: () => void; | ||
PageUp: () => void; | ||
PanoramaGameTimeJumpEvent: (time: duration) => void; | ||
ReloadBackground: () => void; | ||
ScrollDown: () => void; | ||
ScrollLeft: () => void; | ||
ScrollRight: () => void; | ||
ScrollUp: () => void; | ||
SettingsNavigateToPanel: (category: string, panel: Panel) => void; | ||
ShowCenterPrintText: (message: string, priority: unknown) => void; | ||
ShowContentPanel: () => void; | ||
ShowVoteContextMenu: () => void; | ||
StaticHudMenu_EntrySelected: (panel: Panel) => void; | ||
UnloadLoadingScreenAndReinit: () => void; | ||
AchievementInfoLoaded: () => void; | ||
AchievementEarned: (player_index: number, achievement_index: number) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there anything we can do so it doesn't totally fuck up the formatting of this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, prettier will always get rid of indentation like this, personally I prefer it prettier's way, find it easier to read and edit, if you really can't stand it we wouldn't be able to use prettier (happy to discuss that).
p2ce/achievements.d.ts
Outdated
name: string; // Name of the achievement | ||
index: number; // Index of the achievement (for use with the API) | ||
achieved: boolean; // True if this has been achieved | ||
available: boolean; // True if this is available | ||
hide_until_achieved: boolean; // True if this is a "hidden" achievement. It should not be displayed in its full glory until achieved | ||
name: string; // Name of the achievement | ||
index: number; // Index of the achievement (for use with the API) | ||
achieved: boolean; // True if this has been achieved | ||
available: boolean; // True if this is available | ||
hide_until_achieved: boolean; // True if this is a "hidden" achievement. It should not be displayed in its full glory until achieved | ||
flags: number; | ||
count: number; // Current count, if a stat is involved with this achievement. The achievement is granted when count >= goal | ||
goal: number; // Stat goal for this achievement | ||
count: number; // Current count, if a stat is involved with this achievement. The achievement is granted when count >= goal | ||
goal: number; // Stat goal for this achievement | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a huge fan of what it's doing with the comments here (and elsewhere), they were somewhat easier to read as they were.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, I can convert to single line /** */
comments.
Closing as per internal discussion |
Will leave branch in case we change our mind in the future |
Did this a few weeks ago and forgot to PR. Adds Prettier autoformatting, as an npm script and a CI job.
Don't love making this an npm package, but devs won't necessarily need to run
npm install
for any of this if they have a Prettier extension for their editor and use it. But it's there if desired, and is needed for CI job anyway.