Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
```bash
npm run build # Clean dist/ and compile TypeScript
npm test # Run Jest tests with coverage
npm run lint # Biome: format + lint check (no writes)
npm run lint:fix # Biome: apply safe fixes
npm run typecheck # tsc --noEmit over src/ AND test/
npm run generate # Regenerate API client from the OpenAPI specs in specs/
npx jest test/zoomClient.test.ts # Run a single test file
npx jest --testNamePattern "should normalize" # Run tests matching a pattern
```

`npm test` does not typecheck — `@swc/jest` strips types without checking them, and
`npm run build` only covers `src/`. `npm run typecheck` is the only thing that
typechecks `test/`.

## Architecture

Zero-dependency, fully typed Zoom API client for Node.js. Published as `@nektarai/zoom-api-client`.
Expand All @@ -27,7 +34,7 @@ Zero-dependency, fully typed Zoom API client for Node.js. Published as `@nektara
- **ZoomApi** (`src/zoomApi.generated.ts`): 250+ endpoint methods generated from the Zoom OpenAPI specs in `specs/`. Fluent resource pattern: `zoomApi.user(userId).listMeetings()`, `zoomApi.meeting(id).getMeeting()`.
- **Types** (`src/types.generated.ts`): Request param and response types for all generated endpoints.

To regenerate: `npm run generate` — runs `scripts/generate-api.ts` which parses each spec, generates types and API client, then runs Prettier + ESLint on output.
To regenerate: `npm run generate` — runs `scripts/generate-api.ts` which parses each spec, generates types and API client, then runs `biome check --write` on the output.

Zoom publishes one spec per product area. `specs/*.json` are committed verbatim so they can be refreshed from Zoom without a manual merge; register new ones in `SPEC_PATHS` in `scripts/generate-api.ts`. **Order matters** — duplicate method names resolve first-wins, so an earlier spec keeps the cleaner name and later ones fall back to their `operationId`. Keep `Meetings.json` first to hold existing method names stable.

Expand All @@ -45,8 +52,11 @@ Zoom publishes one spec per product area. `specs/*.json` are committed verbatim

## Code Standards

- **Style**: Single quotes, trailing commas, 4-space indent, semicolons (Prettier-enforced)
- **ESLint**: `no-console` is an error. `@typescript-eslint/no-explicit-any` is off. Floating promises are errors.
- **Tooling**: [Biome](https://biomejs.dev) owns both formatting and linting (`biome.json`). It replaced ESLint 8 + Prettier — there is no `.eslintrc.js` or `.prettierrc.js`.
- **Style**: Single quotes, trailing commas, 4-space indent, semicolons. Indent width comes from `.editorconfig` via `formatter.useEditorconfig` (so JSON stays at 2).
- **Lint rules**: Biome `recommended`, plus `noConsole` as an error and `noExplicitAny` / `noTsIgnore` off. `noFloatingPromises` and `noMisusedPromises` are enabled **from nursery** — they are the reason this repo uses Biome's types domain at all, and they may shift behavior across Biome minor versions. Verify they still fire after a Biome upgrade.
- **Overrides** in `biome.json`: `scripts/**` allows `console` and `${}`-in-string (it is a code generator); `src/*.generated.ts` is formatted but not linted; `tsconfig*.json` is parsed as JSONC.
- **`files.maxSize` is raised to 4 MiB.** `src/types.generated.ts` is ~1 MiB and silently exceeds Biome's 1 MiB default, which would skip the largest file in the repo without failing.
- **TypeScript**: Strict mode, ESNext target, CommonJS output. `noImplicitAny` is off despite strict mode.
- **Tests**: Jest with SWC transform. Tests use `nock` for HTTP mocking. Coverage collected from `src/`.

Expand Down
15 changes: 0 additions & 15 deletions .eslintignore

This file was deleted.

51 changes: 0 additions & 51 deletions .eslintrc.js

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@ permissions:
contents: read

jobs:
quality:
name: Lint & Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm

- run: npm ci

# `biome ci` is check-only and enforces assist actions, so it can't
# pass by silently rewriting files the way `biome check` could.
- run: npx biome ci .

# Biome is a native binary and @types/node is pinned to the 22 line,
# so neither check varies by Node major. Run once, not across the matrix.
- run: npm run typecheck

test:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
# Check-only, deliberately not --write: Biome would fix files without
# re-staging them, so the commit would capture the unfixed version.
# Run `npm run lint:fix` when this fails.
npx biome check --staged --no-errors-on-unmatched
12 changes: 0 additions & 12 deletions .prettierignore

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierrc.js

This file was deleted.

63 changes: 63 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.7/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": {
"includes": ["**", "!!**/dist", "!!**/coverage", "!specs"],
"maxSize": 4194304
},
"formatter": {
"enabled": true,
"useEditorconfig": true,
"lineWidth": 80,
"lineEnding": "lf"
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "all",
"semicolons": "always"
}
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended",
"suspicious": {
"noConsole": "error",
"noExplicitAny": "off",
"noTsIgnore": "off"
},
"nursery": {
"noFloatingPromises": "error",
"noMisusedPromises": "error"
}
}
},
"assist": {
"enabled": true,
"actions": { "source": { "organizeImports": "on" } }
},
"overrides": [
{
"includes": ["tsconfig.json", "tsconfig-*.json"],
"json": {
"parser": { "allowComments": true, "allowTrailingCommas": true }
}
},
{
"includes": ["scripts/**"],
"linter": {
"rules": {
"suspicious": {
"noConsole": "off",
"noTemplateCurlyInString": "off"
}
}
}
},
{
"includes": ["src/*.generated.ts"],
"linter": { "rules": { "preset": "none" } }
}
]
}
4 changes: 0 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,4 @@ module.exports = {
],
verbose: true,
workerIdleMemoryLimit: '512M',
/* @Ashniu123 TEMP: Till we upgrade to jest 30
Issue: https://github.com/jestjs/jest/issues/14305
*/
prettierPath: '<rootDir>/node_modules/prettier2/index.js',
};
Loading
Loading