{"_id":"@apeck14/agent-lint","_rev":"2-5be388c6d97b3672104d9930dafdb721","name":"@apeck14/agent-lint","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@apeck14/agent-lint","version":"1.0.0","keywords":["agents","code-quality","formatter","javascript","lint","oxfmt","oxlint","typescript"],"license":"ISC","_id":"@apeck14/agent-lint@1.0.0","maintainers":[{"name":"apeck14","email":"apsuperstar14@yahoo.com"}],"bin":{"agent-lint":"dist/cli.js"},"dist":{"shasum":"59f33e16b94a22609fd6f5b5a6421e06d700c82b","tarball":"https://registry.npmjs.org/@apeck14/agent-lint/-/agent-lint-1.0.0.tgz","fileCount":37,"integrity":"sha512-eMJMmViYlWhbWt5VyuHRjSxZDIjr0+6Nl22xppQSIbDKahyELThjpuJJxyPA1A8uHpDPVs1vFv8qHpvg4AThNw==","signatures":[{"sig":"MEUCIEYgFJ9olhc28yWwphF4h6AAz57qBASNW6TMC7BtYY17AiEAsugozrsjrHFGeZFV27ha2FFe8iZX6Si7G3WrtMTPEWU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":83218},"knip":{"ignoreBinaries":["agent-lint"]},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22.18"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"169fff1fec95ec9662bd0a491db599c4d15a5269","scripts":{"lint":"pnpm run build && node dist/cli.js lint","test":"pnpm run build && node --test --test-concurrency=1 \"test/*.test.mjs\"","build":"node --eval \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.build.json","check":"pnpm run build && node dist/cli.js check --typecheck","format":"pnpm run build && node dist/cli.js format --write","deadcode":"pnpm run build && node dist/cli.js deadcode --production","lint:fix":"pnpm run build && node dist/cli.js lint --fix","typecheck":"tsc --noEmit","audit:prod":"pnpm audit --prod --audit-level high","format:check":"pnpm run build && node dist/cli.js format --check","test:package":"pnpm run build && node test/package-install.mjs","package:check":"pnpm run build && publint --strict && attw --pack . --profile esm-only --no-emoji --no-color && pnpm run test:package && npm pack --dry-run"},"_npmUser":{"name":"apeck14","email":"apsuperstar14@yahoo.com"},"_npmVersion":"11.16.0","description":"Opinionated, agent-first linting and formatting for JavaScript and TypeScript repositories.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"knip":"6.33.0","oxfmt":"0.65.0","oxlint":"1.80.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.25.0","devDependencies":{"publint":"0.3.23","typescript":"5.9.2","@types/node":"24.3.0","@arethetypeswrong/cli":"0.18.5"},"_npmOperationalInternal":{"tmp":"tmp/agent-lint_1.0.0_1788707900062_0.41753290440058444","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@apeck14/agent-lint","version":"1.0.1","description":"Opinionated, agent-first linting and formatting for JavaScript and TypeScript repositories.","keywords":["agents","code-quality","formatter","javascript","lint","oxfmt","oxlint","typescript"],"homepage":"https://github.com/apeck14/agent-lint#readme","bugs":{"url":"https://github.com/apeck14/agent-lint/issues"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/apeck14/agent-lint.git"},"bin":{"agent-lint":"dist/cli.js"},"type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"publishConfig":{"access":"public"},"scripts":{"build":"node --eval \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.build.json","lint":"pnpm run build && node dist/cli.js lint","lint:fix":"pnpm run build && node dist/cli.js lint --fix","format":"pnpm run build && node dist/cli.js format --write","format:check":"pnpm run build && node dist/cli.js format --check","typecheck":"tsc --noEmit","check":"pnpm run build && node dist/cli.js check --typecheck","test":"pnpm run build && node --test --test-concurrency=1 \"test/*.test.mjs\"","test:package":"pnpm run build && node test/package-install.mjs","deadcode":"pnpm run build && node dist/cli.js deadcode --production","audit:prod":"pnpm audit --prod --audit-level high","package:check":"pnpm run build && publint --strict && attw --pack . --profile esm-only --no-emoji --no-color && pnpm run test:package && npm pack --dry-run"},"dependencies":{"knip":"6.33.0","oxfmt":"0.65.0","oxlint":"1.80.0"},"devDependencies":{"@arethetypeswrong/cli":"0.18.5","@types/node":"24.3.0","publint":"0.3.23","typescript":"5.9.2"},"engines":{"node":">=22.18"},"packageManager":"pnpm@11.25.0","knip":{"ignoreBinaries":["agent-lint"]},"gitHead":"a7e33a046e29f36953c8b5ff5a6f72625c6500b8","_id":"@apeck14/agent-lint@1.0.1","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-ofq6DWaEWU7pXCKanvDT2Gpl0zIkNXXgXOrxqSRWgufVuPyD75Tqa4RIANcRwvwJchV3XTuktmE3UhBFdnjQpQ==","shasum":"2ef957de7086b718f8bd583346ab13b492e551f7","tarball":"https://registry.npmjs.org/@apeck14/agent-lint/-/agent-lint-1.0.1.tgz","fileCount":37,"unpackedSize":83781,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@apeck14%2fagent-lint@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHT7CyGfKaCrXmf1DnatzEbzkGYpqXcbl5vm0MTTMN4nAiBZt/2EKLlnkBdyeNSzOTGL5YSfE3TNhb6E2N7fDq18HA=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:425c4ff3-497b-4a91-85d7-8820b0bd0624"}},"directories":{},"maintainers":[{"name":"apeck14","email":"apsuperstar14@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-lint_1.0.1_1788741056602_0.465600649607522"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-06T15:18:19.935Z","modified":"2026-09-07T00:30:57.167Z","1.0.0":"2026-09-06T15:18:20.198Z","1.0.1":"2026-09-07T00:30:56.748Z"},"license":"ISC","keywords":["agents","code-quality","formatter","javascript","lint","oxfmt","oxlint","typescript"],"description":"Opinionated, agent-first linting and formatting for JavaScript and TypeScript repositories.","maintainers":[{"name":"apeck14","email":"apsuperstar14@yahoo.com"}],"readme":"# @apeck14/agent-lint\n\n## Fast, focused guardrails for agentic coding\n\n`agent-lint` is an opinionated quality baseline for JavaScript and TypeScript repos using agentic coding workflows. It\nis especially suited to TypeScript services, APIs, bots, workers, React and Next.js apps, and small monorepos.\n\n- ⚡ Runs native linting and formatting concurrently for short feedback loops.\n- 🧠 Returns deterministic one-line diagnostics capped at 50, reducing agent token and context usage.\n- Catches common mistakes such as cyclic imports, unhandled Promise chains, unsafe TypeScript escapes, stale\n  suppressions, broken React behavior, and focused or disabled tests.\n- Formats code and common text formats consistently, reducing noisy diffs and repeated style decisions.\n- Automates only safe fixes; slower dead-code analysis remains available on demand.\n\n## 📊 Measured results\n\nAcross tested large JavaScript and TypeScript repositories using ESLint, migration benchmarks showed:\n\n- Up to **35× faster** linting.\n- Warm lint runs below **two seconds**.\n- Dead-code scans completing in roughly **0.4–1.1 seconds**.\n\n## 🚀 Quick start\n\nRequires Node.js 22.18 or newer. npm, pnpm, Yarn, and Bun repositories are supported.\n\n```sh\nnpx --yes @apeck14/agent-lint@latest init\n```\n\nThe initializer detects your tooling, installs an exact dev dependency, creates typed configs and package scripts, and\nadds a short workflow to `AGENTS.md`. It runs without prompts and preserves custom files and scripts, reporting conflicts.\n\nRerunning `init` preserves edits to generated configuration, including factory options. If the detected framework or\ntest runner changes, update those options manually.\n\nPreview the exact changes without writing:\n\n```sh\nnpx --yes @apeck14/agent-lint@latest init --dry-run\n```\n\n## 🔁 Daily workflow\n\nGenerated instructions use the repository's package manager. With pnpm, the normal loop is:\n\n```sh\npnpm fix --changed # while working\npnpm check         # before finishing\npnpm deadcode      # after changing modules or dependencies\n```\n\nRun relevant tests too; `check` does not run them.\n\n`--changed` includes staged, unstaged, renamed, and untracked files. If unrelated work is present, pass only the paths\nyou edited. When run inside a monorepo package, Git selection stays within that directory.\n\n## 🧰 Commands\n\n| Command    | Purpose                                                                             |\n| ---------- | ----------------------------------------------------------------------------------- |\n| `check`    | Check lint and formatting; add `--typecheck` for compiler diagnostics               |\n| `fix`      | Apply safe lint fixes, then format                                                  |\n| `lint`     | Lint only; add `--fix` for safe fixes                                               |\n| `format`   | Check formatting; use `--write` to apply it                                         |\n| `deadcode` | Report unused files, exports, and dependencies; supports `--production`             |\n| `init`     | Configure a repository; use `--dry-run` to preview                                  |\n| `doctor`   | Inspect setup, CI wiring, agent instructions, and potential tracked secrets offline |\n\n`check`, `fix`, `lint`, and `format` accept file or directory paths. `check` and `fix` also support `--changed` or\n`--since <ref>` instead of paths.\n\nFor example, `pnpm exec agent-lint check --since origin/main` checks everything changed since the branch diverged from\n`origin/main`, plus current working-tree changes.\n\nOutput options are `--format agent|human|json`,\n`--max-diagnostics <n>`, and `--no-diagnostic-limit`. Exit codes are `0` for clean, `1` for findings, and `2` for\nconfiguration or execution failures.\n\n## 🛡️ Guardrails and defaults\n\n- All enabled rules are errors; warnings cannot accumulate unnoticed.\n- `_`-prefixed variables and parameters are intentional.\n- Production TypeScript rejects explicit `any`, non-null assertions, and unexplained suppression comments. Tests and\n  generated or tooling files receive practical relaxations.\n- React enables hooks, accessibility, render purity, immutability, ref safety, and render-state checks. Next.js, Jest,\n  and Vitest add relevant native rules.\n- Formatting uses 120 columns, two spaces, no semicolons, single quotes including JSX, no trailing commas, and LF.\n- Dependencies, build output, caches, deployment state, reports, lockfiles, snapshots, fixtures, minified files, and\n  conventional generated source are ignored.\n- `check --typecheck` uses the repository's non-recursive `typecheck` script or its installed TypeScript compiler. No\n  bundled compiler is substituted.\n\nLint rules are syntax-based, including Promise-chain checks. Type-aware floating-Promise analysis is not included.\n`check --typecheck` adds compiler diagnostics, such as unresolved TypeScript imports, rather than type-aware lint rules.\n\nFindings stay compact and immediately actionable:\n\n```text\nsrc/example.ts:4:7 [typescript/no-explicit-any] Unexpected any. Specify a different type.\n```\n\nGitHub Actions receives annotations unless you select an output format. Truncated output includes the command for an\nunlimited rerun.\n\n## 🔧 Customization\n\nStart with the generated configuration unchanged. Add an override only for a real repository-specific need; consumer\nvalues take precedence, while ignores and file overrides are additive.\n\n```ts\nimport { createOxlintConfig } from '@apeck14/agent-lint'\n\nexport default createOxlintConfig({\n  environment: 'universal',\n  framework: 'next',\n  testRunner: 'jest',\n  ignores: ['public/vendor/**'],\n  rules: {\n    'no-restricted-imports': [\n      'error',\n      {\n        paths: [{ name: 'legacy-client', message: 'Use the client in src/api/client.ts.' }]\n      }\n    ]\n  }\n})\n```\n\nThe package also exports `createOxfmtConfig` with additive `ignores` and `overrides`, Tailwind v3/v4 configuration,\nand final formatter overrides. Set `tailwind: false` to disable Tailwind sorting.\n\nRepository-specific import restrictions are particularly useful for agents. Include the preferred replacement in the\nrule message so the diagnostic explains how to repair the problem.\n\nThere are no install-time scripts or automatic hooks. `doctor` and `deadcode` are read-only.\n\n## License\n\nISC\n","readmeFilename":"README.md","homepage":"https://github.com/apeck14/agent-lint#readme","repository":{"type":"git","url":"git+https://github.com/apeck14/agent-lint.git"},"bugs":{"url":"https://github.com/apeck14/agent-lint/issues"}}