Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
illright committed May 30, 2024
1 parent 8932986 commit 009b685
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/fsd-aware-traverse.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { basename, join } from "node:path";

import { conventionalSegmentNames, layerSequence, unslicedLayers, type File, type Folder, type LayerName } from "./definitions.js";
import {
conventionalSegmentNames,
layerSequence,
unslicedLayers,
type File,
type Folder,
type LayerName,
} from "./definitions.js";

/**
* Extract layers from an FSD root.
Expand All @@ -12,7 +19,8 @@ export function getLayers(fsdRoot: Folder): Partial<Record<LayerName, Folder>> {
fsdRoot.children
.filter(
(child) =>
child.type === "folder" && layerSequence.includes(basename(child.path)),
child.type === "folder" &&
layerSequence.includes(basename(child.path)),
)
.map((child) => [basename(child.path) as LayerName, child]),
);
Expand Down

0 comments on commit 009b685

Please sign in to comment.