Skip to content

Commit 66398ed

Browse files
committed
fixup!
1 parent 1657f6e commit 66398ed

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/remark-lint/src/rules/duplicate-stability-nodes.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,23 @@ const duplicateStabilityNodes = (tree, vfile) => {
1616
// Update heading depth and clear deeper recorded stabilities
1717
currentHeadingDepth = node.depth;
1818
for (const depth of stabilityByDepth.keys()) {
19-
if (depth >= currentHeadingDepth) stabilityByDepth.delete(depth);
19+
if (depth >= currentHeadingDepth) {
20+
stabilityByDepth.delete(depth);
21+
}
2022
}
2123
return;
2224
}
2325

2426
// Handle blockquotes: extract text from paragraph > text structure
2527
const text = node.children?.[0]?.children?.[0]?.value;
26-
if (!text) return;
28+
if (!text) {
29+
return;
30+
}
2731

2832
const match = createQueries.QUERIES.stabilityIndexPrefix.exec(text); // Match "Stability: X"
29-
if (!match) return;
33+
if (!match) {
34+
return;
35+
}
3036

3137
const stability = match[1];
3238
// Report if a duplicate stability exists in a parent heading depth

0 commit comments

Comments
 (0)