Enable @typescript-eslint/explicit-member-accessibility
on /src (#9785)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src * Prettier
This commit is contained in:
parent
51554399fb
commit
f1e8e7f140
396 changed files with 1110 additions and 1098 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue