Skip to content

Conversation

@boneskull
Copy link
Owner

  • Add eslint-plugin-zod v3.0.1 with project-appropriate configuration
  • Migrate .describe() to .meta() (Zod v4 recommended approach)
  • Migrate z.number().int() to z.int() (Zod v4 native integer schema)
  • Fix imports from zod/v4 to zod in iterable assertions
  • Add type parameters to .brand() calls for compile-time safety
  • Disable no-any-schema and no-unknown-schema (intentional for assertion lib)

- Add eslint-plugin-zod v3.0.1 with project-appropriate configuration
- Migrate .describe() to .meta() (Zod v4 recommended approach)
- Migrate z.number().int() to z.int() (Zod v4 native integer schema)
- Fix imports from zod/v4 to zod in iterable assertions
- Add type parameters to .brand() calls for compile-time safety
- Disable no-any-schema and no-unknown-schema (intentional for assertion lib)
Copilot AI review requested due to automatic review settings January 15, 2026 21:24
Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the codebase to Zod v4 idioms by adding eslint-plugin-zod v3.0.1 and enforcing best practices through ESLint rules. The migration ensures consistency with Zod v4's recommended patterns while maintaining backward compatibility.

Changes:

  • Added eslint-plugin-zod v3.0.1 with comprehensive rule configuration
  • Migrated .describe() calls to .meta({ description: ... }) (Zod v4 idiom)
  • Replaced z.number().int() with z.int() (Zod v4 native integer schema)
  • Fixed incorrect imports from zod/v4 to zod
  • Added type parameters to .brand() calls for type safety
  • Disabled no-any-schema and no-unknown-schema rules (intentional for assertion library design)

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Added eslint-plugin-zod v3.0.1 dependency
package-lock.json Added eslint-plugin-zod v3.0.1 with dependencies
eslint.config.js Configured zod plugin rules with project-appropriate settings
packages/bupkis/src/schema.ts Migrated .describe() to .meta(), z.number().int() to z.int()
packages/bupkis/src/metadata.ts Migrated .describe() to .meta()
packages/bupkis/src/internal-schema.ts Migrated .describe() to .meta()
packages/bupkis/src/assertion/slotify.ts Migrated .describe() to .meta(), added type parameters to .brand()
packages/bupkis/src/assertion/impl/sync-iterable.ts Fixed import from 'zod/v4' to 'zod'
packages/bupkis/src/assertion/impl/sync-basic.ts Migrated .describe() to .meta()
packages/bupkis/src/assertion/impl/async-iterable.ts Fixed import from 'zod/v4' to 'zod'
packages/property-testing/src/config.ts Added eslint-disable comments for intentional custom schema usage
Comments suppressed due to low confidence (6)

packages/bupkis/src/internal-schema.ts:111

  • This .describe() call was not migrated to .meta() as part of the Zod v4 migration. According to the PR description and the zod/prefer-meta ESLint rule configured in eslint.config.js, all .describe() calls should be migrated to .meta({ description: ... }).
    schema: SchemaSchema.describe('The sync schema to validate against'),

packages/bupkis/src/internal-schema.ts:115

  • This .describe() call was not migrated to .meta() as part of the Zod v4 migration. According to the PR description and the zod/prefer-meta ESLint rule configured in eslint.config.js, all .describe() calls should be migrated to .meta({ description: ... }).
    asyncSchema: SchemaSchema.describe('The async schema to validate against'),

packages/bupkis/src/schema.ts:459

  • This .describe() call was not migrated to .meta() as part of the Zod v4 migration. According to the PR description and the zod/prefer-meta ESLint rule configured in eslint.config.js, all .describe() calls should be migrated to .meta({ description: ... }).
  .describe('Function declared with the `async` keyword')

packages/bupkis/src/schema.ts:1013

  • This .describe() call was not migrated to .meta() as part of the Zod v4 migration. According to the PR description and the zod/prefer-meta ESLint rule configured in eslint.config.js, all .describe() calls should be migrated to .meta({ description: ... }).
  .describe(
    'Duration string like "1 hour", "30 minutes", "2 days" (transforms to milliseconds)',
  );

packages/bupkis/src/schema.ts:1098

  • This .describe() call was not migrated to .meta() as part of the Zod v4 migration. According to the PR description and the zod/prefer-meta ESLint rule configured in eslint.config.js, all .describe() calls should be migrated to .meta({ description: ... }).
  .describe('A Set or WeakSet instance');

packages/bupkis/src/schema.ts:1197

  • This .describe() call was not migrated to .meta() as part of the Zod v4 migration. According to the PR description and the zod/prefer-meta ESLint rule configured in eslint.config.js, all .describe() calls should be migrated to .meta({ description: ... }).
  .describe('A Map or WeakMap instance');

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@boneskull boneskull added the chore tooling & overhead label Jan 15, 2026
@boneskull boneskull merged commit 4f1dc4c into main Jan 15, 2026
19 checks passed
@boneskull boneskull deleted the eslint-zod branch January 15, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore tooling & overhead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants