ESLint --fix: auto-fix brace-style, indent, semi, no-trailing-spaces

Run eslint --fix across src/ to clear ~1900 mechanical lint errors
surfaced by the @typescript-eslint v8 + react-hooks v7 + react-compiler
upgrade in the React 19 modernization PR.

Issues fixed automatically:
- brace-style (Allman): try/catch one-liners reformatted to multi-line
- indent: tab-vs-space and depth corrections
- semi: missing trailing semicolons
- no-trailing-spaces

No semantic changes. Remaining 701 errors are real-code issues
(set-state-in-effect, rules-of-hooks, no-unsafe-* type checks) that
need manual per-file review.

https://claude.ai/code/session_01GrR87LAqnAEyKG2ZbmQt5Q
This commit is contained in:
simoleo89
2026-05-11 16:31:50 +00:00
parent 1b1e0c18bf
commit 535fa71020
115 changed files with 2217 additions and 1524 deletions
+14 -4
View File
@@ -17,13 +17,20 @@ export const setAccessToken = (token: string | null | undefined, expiresAt?: num
window.localStorage.removeItem(EXPIRES_KEY);
}
}
catch {}
catch
{}
};
export const getAccessToken = (): string =>
{
try { return window.localStorage.getItem(STORAGE_KEY) ?? ''; }
catch { return ''; }
try
{
return window.localStorage.getItem(STORAGE_KEY) ?? '';
}
catch
{
return '';
}
};
export const getAccessTokenExpiresAt = (): number =>
@@ -35,7 +42,10 @@ export const getAccessTokenExpiresAt = (): number =>
const value = parseInt(raw, 10);
return Number.isFinite(value) ? value : 0;
}
catch { return 0; }
catch
{
return 0;
}
};
export const clearAccessToken = (): void =>
@@ -87,7 +87,7 @@ export class AvatarEditorThumbnailsHelper
AvatarFigurePartType.PET,
'ptl',
'ptr',
AvatarFigurePartType.MISC,
AvatarFigurePartType.MISC,
'mcl',
'mcr',
];
+26 -7
View File
@@ -31,8 +31,14 @@ export interface CustomBadgeError
const interpolate = (value: string): string =>
{
try { return GetConfiguration().interpolate(value); }
catch { return value; }
try
{
return GetConfiguration().interpolate(value);
}
catch
{
return value;
}
};
const getConfigUrl = (key: string, fallback: string): string =>
@@ -61,8 +67,14 @@ const parseJson = async <T>(response: Response): Promise<T> =>
{
const text = await response.text();
if(!text) return {} as T;
try { return JSON.parse(text) as T; }
catch { throw new Error('Invalid response from server.'); }
try
{
return JSON.parse(text) as T;
}
catch
{
throw new Error('Invalid response from server.');
}
};
const throwOnError = async (response: Response): Promise<void> =>
@@ -129,8 +141,14 @@ const injectTextsIntoLocalization = (texts: Record<string, string> | null | unde
{
if(!texts) return;
let manager: ReturnType<typeof GetLocalizationManager> | null = null;
try { manager = GetLocalizationManager(); }
catch { return; }
try
{
manager = GetLocalizationManager();
}
catch
{
return;
}
if(!manager || typeof manager.setValue !== 'function') return;
for(const key of Object.keys(texts))
{
@@ -152,7 +170,8 @@ export const ensureCustomBadgeTexts = (): Promise<void> =>
const payload = await parseJson<{ texts: Record<string, string> }>(response);
injectTextsIntoLocalization(payload.texts);
}
catch {}
catch
{}
})();
return customBadgeTextsLoadPromise;
};
+1 -1
View File
@@ -15,7 +15,7 @@ export class FurnitureOffer implements IPurchasableOffer
constructor(furniData: IFurnitureData)
{
this._furniData = furniData;
this._product = (new Product(this._furniData.type, this._furniData.id, this._furniData.customParams, 1, GetProductDataForLocalization(this._furniData.className), this._furniData) as IProduct);
this._product = (new Product(this._furniData.type, this._furniData.id, this._furniData.customParams, 1, GetProductDataForLocalization(this._furniData.className), this._furniData));
}
public activate(): void
+1 -1
View File
@@ -9,5 +9,5 @@ export const GetGroupChatData = (extraData: string) =>
const figure = splitData[1];
const userId = parseInt(splitData[2]);
return ({ username: username, figure: figure, userId: userId } as IGroupChatData);
return ({ username: username, figure: figure, userId: userId });
};
+1 -1
View File
@@ -20,7 +20,7 @@ export class AvatarInfoUser implements IAvatarInfo
public prefixFont: string = '';
public displayOrder: string = 'icon-prefix-name';
public achievementScore: number = 0;
public backgroundId: number = 0;
public backgroundId: number = 0;
public standId: number = 0;
public overlayId: number = 0;
public cardBackgroundId: number = 0;
+1 -1
View File
@@ -190,7 +190,7 @@ export class AvatarInfoUtilities
userInfo.prefixEffect = userData.prefixEffect;
userInfo.prefixFont = userData.prefixFont;
userInfo.displayOrder = userData.displayOrder;
userInfo.backgroundId = userData.background;
userInfo.backgroundId = userData.background;
userInfo.standId = userData.stand;
userInfo.overlayId = userData.overlay;
userInfo.cardBackgroundId = userData.cardBackground ?? 0;
@@ -9,9 +9,11 @@ export class chooserSelectionVisualizer
{
if (this.animationFrameId !== null) return;
const animate = (time: number) => {
const animate = (time: number) =>
{
const elapsed = time / 1000; // Convert to seconds
this.activeFilters.forEach(filter => {
this.activeFilters.forEach(filter =>
{
filter.time = elapsed; // Update time uniform
});
this.animationFrameId = requestAnimationFrame(animate);
@@ -22,7 +24,8 @@ export class chooserSelectionVisualizer
private static stopAnimation(): void
{
if (this.animationFrameId !== null) {
if (this.animationFrameId !== null)
{
cancelAnimationFrame(this.animationFrameId);
this.animationFrameId = null;
}
@@ -69,7 +72,8 @@ export class chooserSelectionVisualizer
sprite.filters = (sprite.filters || []).filter(f => !(f instanceof ChooserSelectionFilter));
}
if (this.activeFilters.size === 0) {
if (this.activeFilters.size === 0)
{
this.stopAnimation();
}
}
+1 -1
View File
@@ -33,6 +33,6 @@ export class MannequinUtilities
figureContainer.removePart(part);
}
figureContainer.updatePart((this.MANNEQUIN_FIGURE[0] as string), (this.MANNEQUIN_FIGURE[1] as number), (this.MANNEQUIN_FIGURE[2] as number[]));
figureContainer.updatePart((this.MANNEQUIN_FIGURE[0]), (this.MANNEQUIN_FIGURE[1]), (this.MANNEQUIN_FIGURE[2]));
};
}
+12 -6
View File
@@ -18,8 +18,10 @@ interface IUiSettingsContext
const UiSettingsContext = createContext<IUiSettingsContext>({
settings: DEFAULT_UI_SETTINGS,
isCustomActive: false,
updateSettings: () => {},
resetSettings: () => {},
updateSettings: () =>
{},
resetSettings: () =>
{},
getHeaderStyle: () => ({}),
getTabsStyle: () => ({}),
getAccentColor: () => DEFAULT_UI_SETTINGS.headerColor
@@ -42,7 +44,8 @@ const loadSettings = (): IUiSettings =>
const stored = localStorage.getItem(STORAGE_KEY);
if(stored) return { ...DEFAULT_UI_SETTINGS, ...JSON.parse(stored) };
}
catch(e) {}
catch(e)
{}
return { ...DEFAULT_UI_SETTINGS };
};
@@ -53,7 +56,8 @@ const saveSettings = (settings: IUiSettings): void =>
{
localStorage.setItem(STORAGE_KEY, JSON.stringify(settings));
}
catch(e) {}
catch(e)
{}
};
const sendComposer = (composer: any): void =>
@@ -62,7 +66,8 @@ const sendComposer = (composer: any): void =>
{
GetCommunication()?.connection?.send(composer);
}
catch(e) {}
catch(e)
{}
};
export const UiSettingsProvider: FC<PropsWithChildren> = ({ children }) =>
@@ -93,7 +98,8 @@ export const UiSettingsProvider: FC<PropsWithChildren> = ({ children }) =>
saveSettings(serverSettings);
}
}
catch(e) {}
catch(e)
{}
};
connection.addMessageEvent(new UiSettingsDataEvent(handler));
+1 -1
View File
@@ -32,7 +32,7 @@ export class ProductImageUtility
}
}
break;
case FurnitureType.EFFECT:
case FurnitureType.EFFECT:
// fx_icon_furniClassId_png
break;
}
+8 -3
View File
@@ -53,8 +53,12 @@ export const SetRememberLogin = (data: RememberLoginData): void =>
{
if(!data?.token?.length && !data?.ssoTicket?.length) return;
try { window.localStorage.setItem(REMEMBER_LOGIN_KEY, JSON.stringify(data)); }
catch {}
try
{
window.localStorage.setItem(REMEMBER_LOGIN_KEY, JSON.stringify(data));
}
catch
{}
};
export const ClearRememberLogin = (): void =>
@@ -64,7 +68,8 @@ export const ClearRememberLogin = (): void =>
window.localStorage.removeItem(REMEMBER_LOGIN_KEY);
window.localStorage.removeItem(LEGACY_REMEMBER_LOGIN_KEY);
}
catch {}
catch
{}
};
export const StoreRememberLoginFromPayload = (payload: Record<string, unknown>, username?: string, ssoTicket?: string): void =>
+4 -1
View File
@@ -1,4 +1,7 @@
let _youtubeEnabled = false;
export const getYoutubeRoomEnabled = () => _youtubeEnabled;
export const setYoutubeRoomEnabled = (enabled: boolean) => { _youtubeEnabled = enabled; };
export const setYoutubeRoomEnabled = (enabled: boolean) =>
{
_youtubeEnabled = enabled;
};