Emotion style utilities and types, published to npm as an ESM-only TypeScript package. See README.markdown for human-facing setup.
npm run dev-lint-test # npm install, then docs check, type check, ESLint, Prettier, Vitest, publint, attw
npm run build-lint-test # build, then the same checks (what CI and prepublishOnly run)
npm run docs # regenerate docs/ (docs-check fails if it's stale)
npm run outdated # report Node, npm package and GitHub Actions updates- Run
npm run docsafter changing a TSDoc comment or an exported signature. - Tests are Vitest, in
src/*.test.ts. They check the serialized CSS (SerializedStyles.styles) each utility produces. - The Node major is set in both
mise.tomlandpackage.json'sdevEngines.runtime; change them together. tsconfig-dist.jsoncheckssrc/without Node types: library code runs in browsers, so don't use Node APIs there.devLabeldeclares theprocess.env.NODE_ENVit reads, which bundlers replace at build time.
.claude/settings.json makes Claude Code ask before editing .npmrc or .claude/, and before running mise trust or git add, commit, push or config. It denies edits to .git/ outright: a hook dropped in .git/hooks/ would run unconfined as the developer.
These rules are a backstop, not the boundary. Against the file tools (Read/Edit/Write) they're structural, but against Bash they only match command text, so sh -c '…' would slip past one. Never rephrase a command so it no longer matches a rule. A permission prompt isn't an invitation: only take the actions below when the user has asked for them, and treat a declined prompt as the user's decision. When a rule or gate blocks something, say what blocked it and hand over the exact command or edit for a human to run.
- Only stage, commit or push when asked. Otherwise leave changes in the working tree for a human to review. Don't rewrite history or change git config unless asked.
- Only edit
.npmrcor.claude/when asked..npmrcholds the supply-chain gates below, and.claude/holds these rules. - Keep
mise.toml[tools]-only. mise trusts a tools-only config automatically. Adding[env],[hooks]or[tasks]makes it requiremise trust, which lets the config run code, so only runmise trustwhen asked. - Node comes from mise's shims. If
node --versiondoesn't matchmise.toml, stop and tell the user rather than prefixing commands withmise exec.
npm enforces these itself, from .npmrc and package.json's devEngines and allowScripts:
min-release-age=1: installs only resolve versions published more than a day ago. Our own@asl-19/*scope is exempt.npm ciinstalls exactly what's in the lockfile, so it isn't affected.strict-allow-scripts=true: dependency install scripts run only ifallowScriptsapproves them.allow-git=none,allow-remote=none: dependencies come from the npm registry only.engine-strict=true+devEngines: npm older than 11.17 ignores the keys above, so this refuses to run with one.
Every gate can be switched off for a single command with a CLI flag or an npm_config_* environment variable. That's an escape hatch for a human, not for an agent looking at a failed install:
- Never loosen a gate for a command. That means no
--min-release-age,--min-release-age-exclude,--before,--allow-scripts,--dangerously-allow-all-scripts,--no-strict-allow-scripts,--allow-git,--allow-remoteor--no-engine-strict, nonpm_config_*equivalents, and the same fornpx. - Don't edit
devEnginesorallowScriptsinpackage.jsonto get past a gate. The rest ofpackage.jsonis fine to edit. - When a gate blocks an install, stop and report it:
- Version too new: wait out the release-age window, or hand the install command to a human to run in their own terminal.
- Unapproved install script: name the package and what its script does. Approving it (
npm install-scripts approve <pkg>) is a human decision. EBADDEVENGINES: the active Node or npm isn't the one frommise.toml, so see "Node comes from mise's shims" above.