npm workspaces monorepo providing standardized ESLint, Prettier, TypeScript, and Stylelint configs for all @krudi/* projects. Changes here propagate to every consuming project.
- npm workspaces, Turbo
- Packages:
@krudi/eslint-config,@krudi/prettier-config,@krudi/typescript-config,@krudi/stylelint-config
Prerequisites: Node.js ≥ 20.
npm install— install all workspace dependenciesnpm run build— verify all packages build cleanlynpm run lint— verify linting passes- Verify: import a config in a test file and confirm it resolves correctly
npm run build # build all packages (Turbo)
npm run dev # watch mode (incremental rebuild)
npm run lint # lint all packages
npm run typecheck # typecheck all packages
npm run clean # clean dist/ and .turbo/packages/
eslint-config/ # @krudi/eslint-config — flat config format
prettier-config/ # @krudi/prettier-config
typescript-config/ # @krudi/typescript-config — base tsconfig.json
stylelint-config/ # @krudi/stylelint-config
turbo.json # build pipeline
package.json # workspace root
All packages export plain config objects or JSON files consumed via extends or import in consumer projects.
Consumers: react-template, vue-template, impuls, krudi-io, ai-rag-frontend, shared-styles
Config formats:
- ESLint: flat config (
eslint.config.js) — no.eslintrc - TypeScript:
tsconfig.jsonwithextendschains - Prettier: exported as an object from
prettier.config.js - Stylelint: exported as an object
- Build test:
npm run build— catches syntax errors and TypeScript issues - Consumer test: install the local package in
impulsorai-rag-frontendand verify linting still passes - Required before publishing: run
npm run build && npm run lint && npm run typecheck— all must pass
- Make changes to the relevant package
- Bump the version in that package's
package.json— keep all packages in sync (same version across all four) - Run
npm run buildto verify - Test against at least one consumer project (see Testing above)
- Publish:
npm publish --workspacesfrom the workspace root
Version policy: bump all four packages together even if only one changed — consumers install them as a set.
- Consumed by:
react-template,vue-template,impuls,krudi-io,ai-rag-frontend,shared-styles - A breaking change (rule rename, tsconfig option change) will fail CI in all consumers simultaneously
- Always test a breaking change in at least
impuls(most complex consumer) before publishing
- Breaking changes propagate everywhere — test against at least one consumer project before publishing
- Version bump all packages together to keep consumers in sync
- Flat ESLint config format (
eslint.config.js) — no.eslintrc
@.ai/rules/npm-monorepo.md
| Command | What it does |
|---|---|
/test |
Build, lint, and typecheck all packages |
| Rule file | Applied to |
|---|---|
.ai/rules/npm-monorepo.md |
package.json, turbo.json, **/*.ts |
- High blast radius — every change here affects
react-template,vue-template,impuls,krudi-io,ai-rag-frontend, andshared-styles - Before suggesting a rule change, ask: will this break existing consumer code?
- Keep all four packages on the same version — do not bump one independently
- ESLint uses flat config (
eslint.config.js) — never suggest.eslintrcformat