Files
llmx/codex-cli/package.json
Alpha Diop 639c67b909 Feat/add husky (#223)
# Add Husky and lint-staged for automated code quality checks

## Description
This PR adds Husky Git hooks and lint-staged to automate code quality
checks during the development workflow.

## Features Added
- Pre-commit hook that runs lint-staged to check files before committing
- Pre-push hook that runs tests and type checking before pushing
- Configuration for lint-staged to format and lint different file types
- Documentation explaining the Husky setup and usage
- Updated README.md with information about Git hooks

## Benefits
- Ensures consistent code style across the project
- Prevents pushing code with failing tests or type errors
- Reduces the need for style-related code review comments
- Improves overall code quality

## Implementation Details
- Added Husky and lint-staged as dev dependencies
- Created pre-commit and pre-push hooks
- Added configuration for lint-staged
- Added documentation in HUSKY.md
- Updated README.md with a new section on Git hooks

## Testing
The hooks have been tested locally and work as expected:
- Pre-commit hook runs ESLint and Prettier on staged files
- Pre-push hook runs tests and type checking

I have read the CLA Document and I hereby sign the CLA

---------

Signed-off-by: Alpha Diop <alphakhoss@gmail.com>
2025-04-17 07:18:43 -07:00

89 lines
2.6 KiB
JSON

{
"name": "@openai/codex",
"version": "0.1.2504161510",
"license": "Apache-2.0",
"bin": {
"codex": "dist/cli.js"
},
"type": "module",
"engines": {
"node": ">=22"
},
"scripts": {
"format": "prettier --check src tests",
"format:fix": "prettier --write src tests",
"dev": "tsc --watch",
"lint": "eslint src tests --ext ts --ext tsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint src tests --ext ts --ext tsx --fix",
"test": "vitest run",
"test:watch": "vitest --watch",
"typecheck": "tsc --noEmit",
"build": "node build.mjs",
"build:dev": "NODE_ENV=development node build.mjs --dev && NODE_OPTIONS=--enable-source-maps node dist/cli-dev.js",
"release:readme": "cp ../README.md ./README.md",
"release:version": "codex -a full-auto 'update the CLI_VERSION in codex-cli/src/utils/session.ts and the version in package.json to use the current timestamp (YYMMDDHHmm format)'",
"release": "npm run release:readme && npm run release:version && npm run build && npm publish",
"prepare": "husky",
"pre-commit": "lint-staged"
},
"files": [
"README.md",
"dist",
"src"
],
"dependencies": {
"@inkjs/ui": "^2.0.0",
"chalk": "^5.2.0",
"diff": "^7.0.0",
"dotenv": "^16.1.4",
"fast-deep-equal": "^3.1.3",
"file-type": "^20.1.0",
"ink": "^5.2.0",
"marked": "^15.0.7",
"marked-terminal": "^7.3.0",
"meow": "^13.2.0",
"open": "^10.1.0",
"openai": "^4.89.0",
"react": "^18.2.0",
"shell-quote": "^1.8.2",
"to-rotated": "^1.0.0",
"use-interval": "1.4.0"
},
"devDependencies": {
"@eslint/js": "^9.22.0",
"@types/diff": "^7.0.2",
"@types/js-yaml": "^4.0.9",
"@types/marked-terminal": "^6.1.1",
"@types/react": "^18.0.32",
"@types/shell-quote": "^1.7.5",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"esbuild": "^0.25.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.19",
"husky": "^9.1.7",
"ink-testing-library": "^3.0.0",
"lint-staged": "^15.5.1",
"prettier": "^2.8.7",
"punycode": "^2.3.1",
"ts-node": "^10.9.1",
"typescript": "^5.0.3",
"vitest": "^3.0.9",
"whatwg-url": "^14.2.0"
},
"resolutions": {
"braces": "^3.0.3",
"micromatch": "^4.0.8",
"semver": "^7.7.1"
},
"overrides": {
"punycode": "^2.3.1"
},
"repository": {
"type": "git",
"url": "https://github.com/openai/codex"
}
}