@10stars/config
v22.0.0
Published
Readme
@10stars/config
Shareable Configs
React Compiler rules (browser config)
react/globals, react/immutability, react/preserve-manual-memoization, react/refs and
react/set-state-in-effect are off. They encode React Compiler semantics, and we build with Vite —
nothing is auto-memoized, so render-time ref reads, idempotent module-scope caches and prop-ref
writes are load-bearing house patterns rather than mistakes. preserve-manual-memoization reports
that hand-written memoization stopped the compiler from optimizing, which cannot apply with no
compiler in the pipeline — and hand-written useCallback/useMemo is required house style here.
react/purity stays on: an impure call during render is unstable under any build.
Install
- Not intended for global installation
- Use it as part of your project's
devDependencies
Commands
Single-repository commands:
bunx config ts: typecheck onetsconfig.jsonin watch mode.bunx config typecheck: typecheck onetsconfig.jsononce.bunx config lint: format and lint one repository.
Run these commands from a parent directory containing repositories as immediate children:
bunx config tsAll: watch the root and immediate-childtsconfig.jsonfiles in one TypeScript build process. The latest complete cycle is written atomically to.typecheck-diagnostics.json. TypeScript build caches are stored under each project's ignorednode_modules/.cachedirectory.bunx config typecheckAll: typecheck the same projects once in one TypeScript build process.
Oxfmt and Oxlint discover nested tool configs. Child repository VCS ignore files are not guaranteed to apply from the parent process. Put required Oxfmt exclusions in formatIgnore of the repository's 10stars.config.ts (prepare regenerates .oxfmtrc.json from them) and Oxlint exclusions in .oxlintrc.json.
prepare writes a .husky/pre-commit that runs bun fmt --staged. List generated files a commit must not take stale (e.g. screenshot baselines) in generatedPaths of 10stars.config.ts, as git pathspecs, and the hook also blocks a commit when one of them changed after it was staged.
