mirror of
https://github.com/bitbaum/ai-forms.git
synced 2026-12-04 13:57:34 +01:00
`verify` here was `build && test`. Two gaps behind that:
- No lint at all. ESLint was not a dependency, there was no config, and no
script referenced it — so the fleet verify floor (lint AND typecheck AND
test) was unmet, and nothing checked this package's source style or its
obvious-error class.
- `typecheck` existed but was not in `verify`. `build` is `tsc -p`, so types
were checked as a side effect of emitting. That is not the same gate: it
conflates "compiles to dist" with "types are sound", and it dies the moment
the build strategy changes.
Both are now explicit: verify = lint → typecheck → build → test.
The ESLint config stays close to the recommended presets on purpose. This is
~1k lines of library code; a bespoke rule set would be a second opinion to
maintain for no benefit. The floor is "lint runs and can fail", not "lint
encodes taste". `no-explicit-any` is a warning rather than an error because
the public API deliberately accepts arbitrary user-supplied form shapes, so
those `any`s are load-bearing.
One finding worth naming: src/react.ts carried
// eslint-disable-next-line react-hooks/exhaustive-deps
with eslint-plugin-react-hooks not installed. Under a working lint that
directive is itself an error ("Definition for rule was not found") — the
comment was writing a cheque the config could not cash, and nobody knew
because lint never ran. Installing the plugin makes the suppression meaningful
and lints the exported hook for real.
CI needs no change: ci.yml and publish.yml already call `npm run verify`
verbatim, so lint now also gates npm releases.
Verified: `npm run verify` passes locally — eslint clean (exit 0), typecheck
clean, build clean, 19/19 tests pass.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
78 lines
1.8 KiB
JSON
78 lines
1.8 KiB
JSON
{
|
|
"name": "ai-forms",
|
|
"version": "0.1.1",
|
|
"description": "Headless AI form filling and conversational refinement. Provider-agnostic core, React hook, and a server route factory.",
|
|
"license": "MIT",
|
|
"author": "Mao Nakamoto",
|
|
"homepage": "https://github.com/maonakamoto/ai-forms#readme",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/maonakamoto/ai-forms.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/maonakamoto/ai-forms/issues"
|
|
},
|
|
"keywords": [
|
|
"ai",
|
|
"forms",
|
|
"form-fill",
|
|
"autofill",
|
|
"llm",
|
|
"react",
|
|
"headless",
|
|
"natural-language"
|
|
],
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"provenance": true
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./react": {
|
|
"types": "./dist/react.d.ts",
|
|
"default": "./dist/react.js"
|
|
},
|
|
"./server": {
|
|
"types": "./dist/server.d.ts",
|
|
"default": "./dist/server.js"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.json",
|
|
"lint": "eslint .",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"test": "node --test test/*.test.js",
|
|
"verify": "npm run lint && npm run typecheck && npm run build && npm test",
|
|
"prepare": "npm run build"
|
|
},
|
|
"peerDependencies": {
|
|
"react": ">=18"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"react": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.39.5",
|
|
"@types/node": "^22.10.2",
|
|
"@types/react": "^19.0.2",
|
|
"eslint": "^9.39.5",
|
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
"globals": "^15.15.0",
|
|
"typescript": "^5.8.2",
|
|
"typescript-eslint": "^8.67.0"
|
|
}
|
|
}
|