Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mapringg/standard",
"version": "1.3.0",
"version": "1.3.1",
"description": "One oxlint config and plugin for every repository.",
"license": "MIT",
"repository": "github:mapringg/standard",
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/owners.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const TABLE = [
use: "Call models through #/lib/ai.",
},
{
ban: { module: /^(?:@base-ui-components|@base-ui|@rn-primitives)\// },
ban: { module: /^(?:@base-ui-components|@base-ui|@rn-primitives|@ui-sdk)\// },
kinds: UI,
owner: ["src/components/ui/**"],
use: "Use the primitives from #/components/ui.",
Expand Down
16 changes: 16 additions & 0 deletions test/owners.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,22 @@ test("owners bans forwardRef in every UI app", (t) => {
deepEqual(filesWith(result, "owners"), ["apps/web/src/components/ui/button.tsx"]);
});

test("owners confines UI primitive packages to components/ui in UI apps", (t) => {
const result = lint(t, {
"apps/web/src/components/ui/button.tsx": 'export { Button } from "@ui-sdk/react";\n',
"apps/web/src/features/task/task-button.tsx": 'export { Button } from "@ui-sdk/react";\n',
"apps/web/src/features/task/task-dialog.tsx": 'export { Dialog } from "@base-ui-components/react/dialog";\n',
"apps/mobile/src/features/task/task-text.tsx": 'export { Text } from "@rn-primitives/slot";\n',
"apps/api/src/features/tasks/view.ts": 'export { Button } from "@ui-sdk/react";\n',
"apps/web/src/features/task/task-sdk.ts": 'export { client } from "ui-sdk";\n',
});
deepEqual(filesWith(result, "owners"), [
"apps/mobile/src/features/task/task-text.tsx",
"apps/web/src/features/task/task-button.tsx",
"apps/web/src/features/task/task-dialog.tsx",
]);
});

test("owners lets an owner file's own test use what the owner owns", (t) => {
const result = lint(t, {
"apps/web/src/lib/log.ts": "export const log = (message: string) => console.log(message);\n",
Expand Down
Loading