react-scrollama icon indicating copy to clipboard operation
react-scrollama copied to clipboard

feat: Support TypeScript

Open condorheroblog opened this issue 1 year ago • 8 comments

First of all, I'd like to thank you for your contribution.

Now, I need to use this codebase in a TypeScript environment. I've already migrated to TypeScript, and I'd appreciate any suggestions you might have.

Closed https://github.com/jsonkao/react-scrollama/issues/98

condorheroblog avatar Sep 10 '24 12:09 condorheroblog

If you want to release a new version, just run the npm run release command.

condorheroblog avatar Sep 11 '24 02:09 condorheroblog

@condorheroblog sorry for the delay here. I'm technically a maintainer now and would be interested in getting this merged in, however it looks like your fork messed with the prettier formatting which resulted in a lot of files being changed.

If you're still interested in this, please adjust it back so that it matches up with the existing formatting and reduces the number of changes in this PR

tuckergordon avatar Feb 21 '25 14:02 tuckergordon

Thank you for your reply, yes I am still interested, I used this project on company's official website.

I used Biome to replace ESLint and Prettier for code formatting.

If we want to use ESLint and Prettier, we need to upgrade to the latest version. ESLint from 8 to 9 is a major version upgrade. Can you create a commit to upgrade the formatting tool?

condorheroblog avatar Feb 21 '25 14:02 condorheroblog

👍 yup i'm working on upgrading all the project deps right now and will try to hit eslint as part of that. I'm also using this in some work for my company and was running into the same issue with eslint

tuckergordon avatar Feb 21 '25 14:02 tuckergordon

After you upgrade ESLint, you can modify my code directly or notify me and I will modify the code. Thank you.

If you don't want to configure ESLint one by one, you might consider using https://github.com/antfu/eslint-config.

condorheroblog avatar Feb 21 '25 14:02 condorheroblog

Okay I opened up #107 - give that a try and lmk if you run into any issues. If that works, then i'd suggest using that branch as a starting point and then adding in the typescript support. Hopefully that'll be fairly straightforward with all the changes I made

tuckergordon avatar Feb 21 '25 17:02 tuckergordon

Also thanks for creating tests! Though I'm getting a React Intersection Observer was not configured to handle mocking. message when trying to run them

react-intersection-observer changed some code, I need some time to understand why 😄

Check this link: https://github.com/thebuilder/react-intersection-observer/issues/689#issuecomment-2700006944

condorheroblog avatar Mar 05 '25 07:03 condorheroblog

react-intersection-observer author released a new version (v9.16.0), upgraded to the latest version, solved the warning information in the test.

condorheroblog avatar Mar 06 '25 01:03 condorheroblog