Enhance ESLint configuration and update component destructuring for improved code quality
- Added a rule to allow unused variables prefixed with an underscore in ESLint configuration. - Updated destructuring in leveling-form, logging-form, moderation-form, and welcome-form components to prefix unused variables with an underscore, improving clarity and adherence to ESLint rules. - Expanded German and English localization files with new moderation, auto-moderation, logging, welcome, verification, leveling, economy, and fun module settings for better user experience.
This commit is contained in:
@@ -77,7 +77,7 @@ async function saveLeveling(guildId: string, value: LocalLevelingValue): Promise
|
||||
return { ok: false, error: channelMultipliers.error };
|
||||
}
|
||||
|
||||
const { noXpChannelIdsText, noXpRoleIdsText, roleMultipliersText, channelMultipliersText, ...rest } = value;
|
||||
const { noXpChannelIdsText, noXpRoleIdsText, roleMultipliersText: _roleMultipliersText, channelMultipliersText: _channelMultipliersText, ...rest } = value;
|
||||
|
||||
const payload: LevelingConfigDashboard = {
|
||||
...rest,
|
||||
|
||||
@@ -82,7 +82,7 @@ function toRemote(value: LocalLoggingValue): LoggingConfigDashboard {
|
||||
ignoreBots: value.ignoreBots,
|
||||
ignoredChannelIds: fromCsv(value.ignoredChannelIdsText),
|
||||
ignoredRoleIds: fromCsv(value.ignoredRoleIdsText),
|
||||
logChannels: value.logChannels.map(({ clientKey, ...rest }) => rest)
|
||||
logChannels: value.logChannels.map(({ clientKey: _clientKey, ...rest }) => rest)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ function toLocal(rules: EscalationRuleDashboard[]): LocalEscalation[] {
|
||||
}
|
||||
|
||||
function toRemote(rules: LocalEscalation[]): EscalationRuleDashboard[] {
|
||||
return rules.map(({ clientKey, ...rest }) => rest);
|
||||
return rules.map(({ clientKey: _clientKey, ...rest }) => rest);
|
||||
}
|
||||
|
||||
async function saveModeration(guildId: string, value: ModerationDashboard): Promise<SettingsSaveResult> {
|
||||
|
||||
@@ -70,7 +70,7 @@ async function saveWelcome(guildId: string, value: LocalWelcomeValue): Promise<S
|
||||
return { ok: false, error: leaveEmbed.error };
|
||||
}
|
||||
|
||||
const { userAutoroleIdsText, botAutoroleIdsText, welcomeEmbedText, leaveEmbedText, ...rest } = value;
|
||||
const { userAutoroleIdsText, botAutoroleIdsText, welcomeEmbedText: _welcomeEmbedText, leaveEmbedText: _leaveEmbedText, ...rest } = value;
|
||||
|
||||
const payload: WelcomeConfigDashboard = {
|
||||
...rest,
|
||||
|
||||
Reference in New Issue
Block a user