Skip to content

docs(claude): always existsSync for file existence#594

Merged
John-David Dalton (jdalton) merged 1 commit intomainfrom
claude/docs-existssync-rule
Apr 17, 2026
Merged

docs(claude): always existsSync for file existence#594
John-David Dalton (jdalton) merged 1 commit intomainfrom
claude/docs-existssync-rule

Conversation

@jdalton
Copy link
Copy Markdown
Contributor

Summary

  • Add a shared-standards rule: use existsSync from node:fs for file-existence checks.
  • Forbid fs.access, fs.stat-for-existence, and async fileExists wrappers.
  • Canonical import form: import { existsSync, promises as fs } from 'node:fs'.

Docs-only; no code changes. Keeps socket-sdk-js's CLAUDE.md in sync with the shared rule being rolled out across the socket-* repos.

Test plan

  • pnpm run fix + pnpm run check passed via pre-commit hooks
  • Reviewer sanity-check the wording

Add shared-standards rule: use existsSync from node:fs. Forbid
fs.access, fs.stat-for-existence, and async fileExists wrappers.
Canonical import form: `import { existsSync, promises as fs } from 'node:fs'`.
@jdalton John-David Dalton (jdalton) merged commit 4e40891 into main Apr 17, 2026
11 checks passed
@jdalton John-David Dalton (jdalton) deleted the claude/docs-existssync-rule branch April 17, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants