xo: Fix @typescript-eslint/consistent-indexed-object-style.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-10-24 15:32:47 -07:00
parent 31d5e5a092
commit da91dc5595
3 changed files with 3 additions and 3 deletions

View File

@@ -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(/^@/, '')}**`;

View File

@@ -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`;

View File

@@ -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();