Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 16, 2024
1 parent 9095957 commit 06a0e21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/loader/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function parseJSDocs(input: string | string[]): Schema {

const firstTag = lines.findIndex((l) => l.startsWith("@"));
const comments = clumpLines(
lines.slice(0, firstTag >= 0 ? firstTag : undefined),
lines.slice(0, firstTag === -1 ? undefined : firstTag),
);

if (comments.length === 1) {
Expand All @@ -262,7 +262,7 @@ function parseJSDocs(input: string | string[]): Schema {
schema.description = comments.splice(1).join("\n");
}

if (firstTag >= 0) {
if (firstTag !== -1) {
const tags = clumpLines(lines.slice(firstTag), ["@"], "\n");
// eslint-disable-next-line unicorn/no-array-reduce
const typedefs = tags.reduce(
Expand Down

0 comments on commit 06a0e21

Please sign in to comment.