Skip to content

Commit ad905f2

Browse files
authored
Merge pull request #54 from feature-sliced/hotfix/LINT-53-public-api-segments
LINT-53(HOTFIX): PublicAPI for {segment}.* files
2 parents cf9c5a7 + 7adf9cc commit ad905f2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

rules/public-api/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
const { layersLib } = require("../../utils");
22

3-
const FS_SEGMENTS_REG = layersLib.FS_SEGMENTS.join("|");
43
const FS_SLICED_LAYERS_REG = layersLib.getUpperLayers("shared").join("|");
4+
const FS_SEGMENTS_REG = [
5+
...layersLib.FS_SEGMENTS,
6+
...layersLib.FS_SEGMENTS.map((seg) => `${seg}.*`),
7+
].join('|');
58

69
module.exports = {
710
plugins: ["import"],

rules/public-api/index.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ describe("PublicAPI import boundaries:", () => {
2020
import { saveOrder } from "entities/order/model/actions";
2121
import { orderModel } from "entities/order/model";
2222
import { TicketCard } from "@app/entities/ticket/ui";
23+
import { Ticket } from "@app/entities/ticket/ui.tsx";
2324
`,
2425
{ filePath: "src/app/ui/index.js" });
25-
assert.strictEqual(report[0].errorCount, 7);
26+
assert.strictEqual(report[0].errorCount, 8);
2627
});
2728

2829
it("Should lint PublicAPI boundaries without errors.", async () => {

0 commit comments

Comments
 (0)