Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert active-class-name example to TypeScript #37676

Merged

Conversation

maxproske
Copy link
Contributor

@maxproske maxproske commented Jun 14, 2022

The Contributing guidelines say TypeScript should be leveraged for new examples, so I thought I'd convert this example over.

I also:

  • Upgraded all dependencies
  • Replaced the prop-types package with TypeScript types

Documentation / Examples

  • Make sure the linting passes by running pnpm lint
  • The examples guidelines are followed from our contributing doc

@ijjk ijjk added the examples Issue/PR related to examples label Jun 14, 2022
@maxproske
Copy link
Contributor Author

A couple questions before I continue converting examples to TypeScript:

  • Should TypeScript examples be named with-whatever, and examples that call for a separate JavaScript example be named with-whatever-javascript going forward?
  • Should TypeScript strict mode be enabled? I see 11 examples have it enabled, and 16 have it disabled (including the with-typescript example itself).

Copy link
Member

@balazsorban44 balazsorban44 left a comment

Choose a reason for hiding this comment

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

Thanks! 💚

@balazsorban44
Copy link
Member

Regarding #37676 (comment)

  • I don't think we need a distinct name for JavaScript/TypeScript folders. "examples that call for a separate JavaScript example" Which one is this?
  • I think the default tsconfig.json created by Next.js disables it, so I would go with that.

@kodiakhq kodiakhq bot merged commit 3a22c4c into vercel:canary Jun 14, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants