Lint
This commit is contained in:
parent
1b21e194cf
commit
5c8b02f69c
3 changed files with 8 additions and 6 deletions
|
|
@ -311,13 +311,15 @@ export class SyncSettingsTab extends PluginSettingTab {
|
||||||
parsedValue =
|
parsedValue =
|
||||||
this.syncClient.getSettings().maxFileSizeMB;
|
this.syncClient.getSettings().maxFileSizeMB;
|
||||||
}
|
}
|
||||||
this.syncClient.setSetting(
|
|
||||||
"maxFileSizeMB",
|
|
||||||
parsedValue
|
|
||||||
);
|
|
||||||
if (value !== parsedValue.toString()) {
|
if (value !== parsedValue.toString()) {
|
||||||
input.setValue(parsedValue.toString());
|
input.setValue(parsedValue.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return this.syncClient.setSetting(
|
||||||
|
"maxFileSizeMB",
|
||||||
|
parsedValue
|
||||||
|
);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { globsToRegexes } from "./globs-to-regexes";
|
||||||
|
|
||||||
describe("globsToRegexes", () => {
|
describe("globsToRegexes", () => {
|
||||||
it("basicExample", async () => {
|
it("basicExample", async () => {
|
||||||
const regex = globsToRegexes([".git/**"], new Logger())[0];
|
const [regex] = globsToRegexes([".git/**"], new Logger());
|
||||||
|
|
||||||
expect(regex.test(".git/objects/object")).toBeTruthy();
|
expect(regex.test(".git/objects/object")).toBeTruthy();
|
||||||
expect(regex.test(".git/objects/.object")).toBeTruthy();
|
expect(regex.test(".git/objects/.object")).toBeTruthy();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { makeRe } from "minimatch";
|
import { makeRe } from "minimatch";
|
||||||
import { Logger } from "../tracing/logger";
|
import type { Logger } from "../tracing/logger";
|
||||||
|
|
||||||
export function globsToRegexes(globs: string[], logger: Logger): RegExp[] {
|
export function globsToRegexes(globs: string[], logger: Logger): RegExp[] {
|
||||||
return globs
|
return globs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue