eslint - rules updated

This commit is contained in:
Sebastian Seedorf
2020-11-19 22:22:14 +01:00
parent b79c2f96cd
commit 5c31dc285a
13 changed files with 100 additions and 83 deletions

View File

@@ -2,6 +2,6 @@ import {getUserInfo} from './utils/utils';
export async function getUserName(): Promise<string> {
const info = await getUserInfo();
return info?.name ?? "No name found!";
return info?.name ?? 'No name found!';
}

View File

@@ -6,7 +6,7 @@ import {getUserName} from './SomeModule';
function updateUserName(name: string): void {
const node = document.createElement('span');
node.innerText = `This user name is fetched with Javascript: ${name}`;
document.getElementsByTagName("body")[0].appendChild(node);
document.getElementsByTagName('body')[0].appendChild(node);
}
getUserName().then(updateUserName);
getUserName().then(updateUserName).catch((err) => console.error(err));

View File

@@ -22,7 +22,7 @@ export function resetConfig(): void {
export async function getUserInfo(): Promise<Partial<UserInfo>|undefined> {
const config = await getConfig();
const res = await fetch(config.EXTERNAL_BASE_URL + "/api/user");
const res = await fetch(config.EXTERNAL_BASE_URL + '/api/user');
return res.json();
}