Enable @typescript-eslint/explicit-member-accessibility on /src (#9785)

* Enable `@typescript-eslint/explicit-member-accessibility` on /src

* Prettier
This commit is contained in:
Michael Telatynski 2022-12-16 12:29:59 +00:00 committed by GitHub
parent 51554399fb
commit f1e8e7f140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
396 changed files with 1110 additions and 1098 deletions

View file

@ -24,13 +24,13 @@ import globToRegexp from "glob-to-regexp";
* for server ACLs and similar functions.
*/
export class MatrixGlob {
_regex: RegExp;
private regex: RegExp;
/**
* Creates a new Matrix Glob
* @param {string} glob The glob to convert. Eg: "*.example.org"
*/
constructor(glob: string) {
public constructor(glob: string) {
const globRegex = globToRegexp(glob, {
extended: false,
globstar: false,
@ -39,7 +39,7 @@ export class MatrixGlob {
// We need to convert `?` manually because globToRegexp's extended mode
// does more than we want it to.
const replaced = globRegex.toString().replace(/\\\?/g, ".");
this._regex = new RegExp(replaced.substring(1, replaced.length - 1));
this.regex = new RegExp(replaced.substring(1, replaced.length - 1));
}
/**
@ -47,7 +47,7 @@ export class MatrixGlob {
* @param {string} val The value to test.
* @returns {boolean} True if the value matches the glob, false otherwise.
*/
test(val: string): boolean {
return this._regex.test(val);
public test(val: string): boolean {
return this.regex.test(val);
}
}