TAKASHI YAMASHINA software engineer

Automatically Format Code After Changes

To automatically run linting and formatting in Claude Code after each change, add the following to .claude/settings.json if you have a command like pnpm fix that performs formatting fixes:

json
{
  "scripts": {
    "fix": "eslint --fix && prettier --write"
  }
}
json
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "pnpm fix"
          }
        ]
      }
    ]
  }
}