mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-01 20:43:33 +00:00
xo: Fix @typescript-eslint/consistent-indexed-object-style.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -21,7 +21,7 @@ export async function loadBots(): Promise<void> {
|
||||
const response = await fetch('/json/users');
|
||||
if (response.ok) {
|
||||
const {members} = await response.json();
|
||||
members.forEach(({is_bot, full_name}: {[key: string]: unknown}) => {
|
||||
members.forEach(({is_bot, full_name}: Record<string, unknown>) => {
|
||||
if (is_bot && typeof full_name === 'string') {
|
||||
const bot = `@${full_name}`;
|
||||
const mention = `@**${bot.replace(/^@/, '')}**`;
|
||||
|
||||
@@ -51,7 +51,7 @@ export default class BaseSection extends BaseComponent {
|
||||
/* A method that in future can be used to create dropdown menus using <select> <option> tags.
|
||||
it needs an object which has ``key: value`` pairs and will return a string that can be appended to HTML
|
||||
*/
|
||||
generateSelectHTML(options: {[key: string]: string}, className?: string, idName?: string): string {
|
||||
generateSelectHTML(options: Record<string, string>, className?: string, idName?: string): string {
|
||||
let html = htmlEscape`<select class="${className}" id="${idName}">\n`;
|
||||
Object.keys(options).forEach(key => {
|
||||
html += htmlEscape`<option name="${key}" value="${key}">${options[key]}</option>\n`;
|
||||
|
||||
@@ -9,7 +9,7 @@ const logger = new Logger({
|
||||
});
|
||||
|
||||
// TODO: replace enterpriseSettings type with an interface once settings are final
|
||||
let enterpriseSettings: {[key: string]: unknown};
|
||||
let enterpriseSettings: Record<string, unknown>;
|
||||
let configFile: boolean;
|
||||
|
||||
reloadDB();
|
||||
|
||||
Reference in New Issue
Block a user