Update to eslint-plugin-matrix-org 0.8 (#23825)

* Update to eslint-plugin-matrix-org 0.8

* Exclude some eslint rules for specs

* Fix eslint tests path
This commit is contained in:
Michael Weimann 2022-11-23 17:24:36 +01:00 committed by GitHub
parent c1d4abbeb0
commit cbf5c43ae7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 104 additions and 95 deletions

View file

@ -56,7 +56,7 @@ export default class Favicon {
// callback to run once isReady is asserted, allows for a badge to be queued for when it can be shown
private readyCb?: () => void;
constructor(params: Partial<IParams> = {}) {
public constructor(params: Partial<IParams> = {}) {
this.params = { ...defaults, ...params };
this.icons = Favicon.getIcons();
@ -68,7 +68,7 @@ export default class Favicon {
const lastIcon = this.icons[this.icons.length - 1];
if (lastIcon.hasAttribute("href")) {
this.baseImage.setAttribute("crossOrigin", "anonymous");
this.baseImage.onload = () => {
this.baseImage.onload = (): void => {
// get height and width of the favicon
this.canvas.height = (this.baseImage.height > 0) ? this.baseImage.height : 32;
this.canvas.width = (this.baseImage.width > 0) ? this.baseImage.width : 32;
@ -217,7 +217,7 @@ export default class Favicon {
public badge(content: number | string, opts?: Partial<IParams>): void {
if (!this.isReady) {
this.readyCb = () => {
this.readyCb = (): void => {
this.badge(content, opts);
};
return;