Add @cratis/eslint-plugin-components#95
Conversation
Introduce @cratis/components.eslint, ESLint rules for projects that consume Cratis Components, to compose on top of @cratis/eslint-config: - no-root-barrel-import: require importing from a @cratis/components subpath (e.g. @cratis/components/CommandDialog) instead of the package root barrel. - no-primereact-dialog: forbid importing primereact/dialog; use the Cratis dialog wrappers (CommandDialog, Dialogs) which add Arc binding and theming. Register the ESLint workspace in the repo workspaces. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Expose name + version on the plugin meta (cache keys, --print-config) and docs URLs on both rules so IDEs render a clickable link. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Follow the ESLint scoped-plugin naming convention (@scope/eslint-plugin-*). The plugin namespace stays @cratis/components, so rule IDs are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Make the default export the plugin object itself (meta + rules + self-referencing configs), per the ESLint flat-config plugin convention. Name the config block. Fold recommended.js into index.js. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Previously the first failed 'npm publish' called process.exit(1), aborting the release and stranding every workspace after it. A brand-new package whose npm trusted publisher isn't configured yet would therefore also block the existing packages from releasing. Collect publish failures, keep publishing the rest, and exit non-zero at the end with a summary. Build/test tasks stay fail-fast. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
@einari — two one-time steps before merging this. This is 1 of 3 coordinated PRs: Fundamentals Cratis/Fundamentals#1072, Arc Cratis/Arc#2273, Components #95. 1. Bootstrap
|
Added
@cratis/eslint-plugin-components: ESLint rules for projects that consume Cratis Components, designed to compose on top of@cratis/eslint-config.no-root-barrel-import(rule) — disallows importing from the@cratis/componentsroot barrel. Use a subpath export (@cratis/components/CommandDialog,@cratis/components/DataPage,@cratis/components/Toolbar, …); the root pulls the whole optional-peer-heavy surface and hides intent. Coversimportand re-export … from. Configurable package name and allow-list.no-primereact-dialog(rule) — disallows importingDialogfromprimereact/dialog. UseCommandDialogfrom@cratis/components/CommandDialog, orDialogfrom@cratis/components/Dialogs— the wrappers add Arc command binding, overlay/focus fixes, and theming.Changed
ESLintworkspace to the repoworkspaces.Notes
@scope/eslint-plugin-*). The plugin namespace is@cratis/components, so rule IDs read@cratis/components/no-root-barrel-import.eslintas a peer dependency, and exposesmeta.versionplus per-rule docs URLs. It owns these rules because Components owns its subpath export surface and the dialog wrappers.🤖 Generated with Claude Code