Monorepo for the shared @soujvnunes/* packages.
| Package | What |
|---|---|
@soujvnunes/eslint-config |
Flat ESLint config factories (createBaseConfig, createNextConfig) |
@soujvnunes/prettier-config |
Prettier config factory (createConfig) |
@soujvnunes/stylelint-config |
Stylelint config factory (createConfig), standard rules plus Tailwind v4 at-rules |
@soujvnunes/util |
Zero-dependency utilities (subpath exports): type guards, throw-free fetch (createApi), an NDJSON reader, query strings |
@soujvnunes/lib |
Stateful modules (subpath exports): a Mongoose client and Typegoose bases |
@soujvnunes/react |
React utilities (subpath exports): hooked-context, error-boundary, motion |
@soujvnunes/nextjs |
Next.js utilities (subpath exports): server-seeded, cookie-persisted state (createPersistedToggle) |
@soujvnunes/ui |
Unstyled React component skeletons (Icon), themed through CSS custom properties, with a Storybook |
Separate packages when deps are bundled (the configs); subpaths in one package when deps are peer or zero (util, lib, react, nextjs). ui is one package too, with a module per component and an index that re-exports them all, since its components share one stylesheet and one variable grammar.
This repo lints itself with the base preset of @soujvnunes/eslint-config and formats itself with @soujvnunes/prettier-config, minus the Tailwind plugin and its options, since no published module here holds Tailwind classes (only a few stories in the ui Storybook do). The ESLint config is stricter than most shared configs on a few points: no blank lines between statements, no warning severity (a rule either fails or is absent), and type-aware rules enabled. See its README before adopting it elsewhere.
Each package exposes a factory that takes an overrides object, so a consumer customizes without forking:
// prettier.config.mjs
import { createConfig } from '@soujvnunes/prettier-config'
export default createConfig({ tailwindStylesheet: './src/app/tailwind.config.css' })
// eslint.config.mjs
import { createNextConfig } from '@soujvnunes/eslint-config'
export default createNextConfig({ ignores: ['generated/**'], importGroups: [/* project paths */] })pnpm install
pnpm dev # the ui Storybook, on port 6006
pnpm test
pnpm lint
pnpm format
pnpm changeset # record a change for releaseTests run on Vitest, one project per package, and sit next to the module they cover (util/ellipses.ts and util/ellipses.test.ts). The react, nextjs and ui projects run in jsdom against React Testing Library; every other project runs in node. Nothing reaches a real database or network: lib/mongoose runs against a mocked driver, and createApi against a stubbed fetch. CI runs format on every pull request and on every push to main. It runs build, typecheck, test and lint on every push to main, and on a pull request that changes any file beyond Markdown, .changeset/, .gitignore, .prettierignore and the release workflow; a pull request that changes only those skips them.
The Chromatic workflow builds the ui Storybook on every branch push and publishes it to Chromatic, snapshotting only the stories a change reaches; changes on main become the new baseline. The Storybook of main is at main--6af4b1d8205ec2517800544d.chromatic.com and serves the component docs to agents at /mcp.
On every push to main, the release workflow opens or updates a "Version Packages" pull request from the pending changesets, and publishes to npm when that pull request merges. It calls pnpm run version, never pnpm version, which is pnpm's built-in command and would skip changeset version. It opens the pull request with the RELEASE_PAT secret, because a pull request opened with the default GITHUB_TOKEN starts no workflows, so under a required status check it could never merge; it falls back to GITHUB_TOKEN when the secret is unset.