Hashnode / starter-kit

A blog starter kit to use Hashnode as a Headless CMS using GraphQL APIs.

Home Page:https://hashnode.com/headless

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Review

JannikWempe opened this issue · comments

Some generic comments from my side. They may not be crucial but I think they should at least be pointed out. I have not implemented them right away because they would require more changes and may only reflect my opinion.

We can close and delete this issue afterwards.

There are quite some TS errors that are ignored due to strict: false.
I have temporarily changed it to strict: true and fixed some of the errors. There are quite some errors that could cause exception (e.g. accessing a property of undefined). I think it is best practice to at least use strict: true (IMO the setting should be even stricter than that).

We should favor named exports if possible (not for pages).
There is a reason why highly respected people (like Kent C. Dodds) hate default exports. The DX is just way worse with them.

Formatting is inconsistent.
I have just saved files without formattting because otherwise it would change the whole formatting of the file. IMO we should have a prettier setup that makes it easy for contributors (also internal) to contribute code in a consistent manner.

It doesn't feel right to include the copied highlight.js code here.
IMO it is something that we should get rid of. It is huge, not type-safe, badly maintainable etc.

We should not use the >7 years unmaintained rss package.
I don't think it is a good idea to ship a new project with a dependency that is abandoned for more than 7 years.

Thanks @JannikWempe! Makes sense.

Do you have some time to pick up the first 3 issues? We can deprioritize anything else. I think it's important to tackle these before our 16th release.

It doesn't feel right to include the copied highlight.js code here.

I agree. I hate it as well but there doesn't seem to be any viable option considering all the custom logic we have added over the years to support additional syntaxes. Do you have any other alternative or temporary solutions for now? Because teams/businesses do not really want to tinker with low level details like syntax highlighting. They like what they see on Hashnode blogs and would like to have the same experience.

We should not use the >7 years unmaintained rss package.

Sure, agree. What's the alternative? We can use that instead.

cc'ing @rajatkapoor as well.

Do you have some time to pick up the first 3 issues?

Yes, I'll start tackling those tomorrow morning.

Do you have any other alternative or temporary solutions for now?

Hm, I think there are some good SSR-supporting syntax highlighting libraries out there. This could potentially be a bigger task though. It probably makes sense to focus on tackling lots of tasks instead of trying to tackle this one and maybe end up with no better solution. So this is something to look into if there will be some time left IMO.

Sure, agree. What's the alternative? We can use that instead.

I think feed is an alternative. I can check it out.