Skip to content

Commit 73c0e85

Browse files
3.14.0
1 parent b9e93c6 commit 73c0e85

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/errors/finalErrorGuard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { FinalError } from "errors/FinalError";
22

33
export const finalErrorGuard = (err: unknown): err is FinalError =>
4-
!!((err as FinalError).type === "final");
4+
(err as FinalError).type === "final";

src/rules/fileComposition/helpers/validateFile/helpers/validateRules/helpers/isNameValid.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ export const isNameValid = ({
1111
formatWithoutReferences,
1212
name,
1313
}: IsNameValidProps): boolean =>
14-
Boolean(
15-
formatWithoutReferences.some((pattern) => {
16-
if (isRegexInvalid(pattern)) throw getInvalidRegexError(pattern);
14+
formatWithoutReferences.some((pattern) => {
15+
if (isRegexInvalid(pattern)) throw getInvalidRegexError(pattern);
1716

18-
const regexp = new RegExp(`^${pattern}$`, "g");
17+
const regexp = new RegExp(`^${pattern}$`, "g");
1918

20-
return regexp.test(name);
21-
}),
22-
);
19+
return regexp.test(name);
20+
});

0 commit comments

Comments
 (0)