Shared ESLint flat config for ASL19 projects, published to npm as an ESM-only JavaScript package with generated TypeScript declarations (types/). It exports four configs: base, typescript, react and next. See README.markdown for human-facing setup.
npm run dev-lint-test # npm install, then type check, ESLint, Prettier, Vitest, publint, attw
npm run build-lint-test # build types/, then the same checks (what CI and prepublishOnly run)
npm run outdated # report Node, npm package and GitHub Actions updates- The configs are JavaScript checked by TypeScript (
checkJs);npm run buildgeneratestypes/from them, and it isn't committed. tests/configs.test.tslints the fixtures intests/fixtures/(which deliberately break rules) with each config, checking that every plugin loads and runs on the installed ESLint and that representative rules fire. When adding or replacing a plugin, add an assertion for one of its rules.eslintis a peer dependency: keeppeerDependenciesin step with thedevDependenciesversion. Plugins are regular dependencies, so they must support that ESLint major.- The Node major is set in both
mise.tomlandpackage.json'sdevEngines.runtime; change them together.
.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.