Skip to content

Commit

Permalink
Merge pull request #54 from feature-sliced/hotfix/LINT-53-public-api-…
Browse files Browse the repository at this point in the history
…segments

LINT-53(HOTFIX): PublicAPI for {segment}.* files
  • Loading branch information
Krakazybik authored Dec 23, 2021
2 parents cf9c5a7 + 7adf9cc commit ad905f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion rules/public-api/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const { layersLib } = require("../../utils");

const FS_SEGMENTS_REG = layersLib.FS_SEGMENTS.join("|");
const FS_SLICED_LAYERS_REG = layersLib.getUpperLayers("shared").join("|");
const FS_SEGMENTS_REG = [
...layersLib.FS_SEGMENTS,
...layersLib.FS_SEGMENTS.map((seg) => `${seg}.*`),
].join('|');

module.exports = {
plugins: ["import"],
Expand Down
3 changes: 2 additions & 1 deletion rules/public-api/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ describe("PublicAPI import boundaries:", () => {
import { saveOrder } from "entities/order/model/actions";
import { orderModel } from "entities/order/model";
import { TicketCard } from "@app/entities/ticket/ui";
import { Ticket } from "@app/entities/ticket/ui.tsx";
`,
{ filePath: "src/app/ui/index.js" });
assert.strictEqual(report[0].errorCount, 7);
assert.strictEqual(report[0].errorCount, 8);
});

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

0 comments on commit ad905f2

Please sign in to comment.