- Re-tag core-trpc as core-composition (transitively reaches features
through core-api's AppRouter type) and allow core-composition packages
to depend on other core-composition packages in turbo.json
- Add @payloadcms/richtext-lexical as direct dep of apps/cms (was pulled
transitively via core-cms; Payload's importMap.js imports it directly)
- Add @storybook/react as devDep of core-ui and apps/storybook (stories
belong with components per Atomic Design)
- Update apps/storybook .storybook/{main,preview}.ts to point at
packages/core-ui (was still referencing deleted packages/ui) and export
CSS via package exports instead of direct file import
- Add JSDoc type annotation to Payload-generated importMap.js to suppress
TypeScript's TS2742 error from complex inferred types
- Add storybook-static to eslint ignores in core-eslint base config
pnpm turbo boundaries now reports zero violations.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
48 lines
1.5 KiB
JavaScript
48 lines
1.5 KiB
JavaScript
import js from "@eslint/js";
|
|
import eslintConfigPrettier from "eslint-config-prettier";
|
|
import tseslint from "typescript-eslint";
|
|
import turboPlugin from "eslint-plugin-turbo";
|
|
import boundaries from "eslint-plugin-boundaries";
|
|
|
|
export default [
|
|
{ ignores: ["dist/**", "node_modules/**", ".next/**", ".turbo/**", "storybook-static/**"] },
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
eslintConfigPrettier,
|
|
{
|
|
plugins: { turbo: turboPlugin },
|
|
rules: {
|
|
"turbo/no-undeclared-env-vars": "warn",
|
|
},
|
|
},
|
|
{
|
|
plugins: { boundaries },
|
|
settings: {
|
|
"boundaries/elements": [
|
|
{ type: "app", pattern: "apps/*" },
|
|
{ type: "tooling", pattern: "packages/core-eslint" },
|
|
{ type: "tooling", pattern: "packages/core-typescript" },
|
|
{ type: "core-composition", pattern: "packages/core-api" },
|
|
{ type: "core-composition", pattern: "packages/core-cms" },
|
|
{ type: "core", pattern: "packages/core-*" },
|
|
{ type: "feature", pattern: "packages/!(core-*)" },
|
|
],
|
|
},
|
|
rules: {
|
|
"boundaries/element-types": [
|
|
2,
|
|
{
|
|
default: "disallow",
|
|
rules: [
|
|
{ from: "app", allow: ["app", "core", "core-composition", "feature", "tooling"] },
|
|
{ from: "feature", allow: ["core", "tooling"] },
|
|
{ from: "core", allow: ["core", "tooling"] },
|
|
{ from: "core-composition", allow: ["core", "feature", "tooling"] },
|
|
{ from: "tooling", allow: ["tooling"] },
|
|
],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|