open-sauced / hot

πŸ•The site that recommends the hottest projects on GitHub.
https://hot.opensauced.pizza
MIT License
418 stars 145 forks source link

refactor: Update Year Date in Footer.tsx #456

Closed tmsagarofficial closed 1 year ago

tmsagarofficial commented 1 year ago

What type of PR is this? (check all applicable)

Description

This PR fixes #455 I wanted to get help too on this I could have changed the year fro 2022 to 2023 but I am making it automatic ..

Related Tickets & Documents

document.write(new Date().getFullYear())

I have added the following as a replacement to the static year 2022 . but should I have added this below code??

console.log(document.write(new Date().getFullYear()))

Mobile & Desktop Screenshots/Recordings

Added tests?

Added to documentation?

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

netlify[bot] commented 1 year ago

Deploy Preview for hot-sauced-ui ready!

Name Link
Latest commit 0d38589c75d529d53d536ea0ed63a167e681570d
Latest deploy log https://app.netlify.com/sites/hot-sauced-ui/deploys/6426fe08b2ae7d0008be5ae8
Deploy Preview https://deploy-preview-456--hot-sauced-ui.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

NsdHSO commented 1 year ago

HI @tmsagarofficial, you can make a change in the title. eg fix: update year date from footer

tmsagarofficial commented 1 year ago

Pls check my commit and let me know whenever possible

tmsagarofficial commented 1 year ago

@bdougie What do I do now? what about the tests which have failed? πŸ˜…

bdougie commented 1 year ago

@bdougie What do I do now? what about the tests which have failed? πŸ˜…

npm run format

Those are lint changes needed. This will also need another approval to get merged.

tmsagarofficial commented 1 year ago

@bdougie What do I do now? what about the tests which have failed? πŸ˜…

npm run format

Those are lint changes needed. This will also need another approval to get merged.

I really need help with this. Where do I run this ? Also, I'm getting errors if I'm trying to run that locally

0-vortex commented 1 year ago

Is it done now?

You have to change the values that npm run format is telling you it can't fix, then it is ready! πŸ˜… πŸ•

0-vortex commented 1 year ago

@bdougie What do I do now? what about the tests which have failed? πŸ˜…

npm run format Those are lint changes needed. This will also need another approval to get merged.

I really need help with this. Where do I run this ? Also, I'm getting errors if I'm trying to run that locally

Run npm run format in the project folder, where you installed the dependencies.

Screenshot 2023-03-22 at 08 17 43

It will return the errors it can't fix - those you have to deal with manually πŸ•

bdougie commented 1 year ago

@tmsagarofficial, @0-vortex & @TAKANOME-DEV but I think there is a disconnect in your knowledge on how npm run format works.

Perhaps leverage the Discord for clarification.

@diivi if you are looking for a new docs addition. npm run format would be a great addition.

diivi commented 1 year ago

Nice, Maybe I can do something like this - https://torsion.org/borgmatic/docs/how-to/develop-on-borgmatic/#code-style (from another project I contribute to). Does OpenSauced have a Code Style guide or something related that I could refer to?

diivi commented 1 year ago

Okay, just checked the README for this project; a new heading Code Linting in the Introduction to Contributing section sounds good.

bdougie commented 1 year ago

Okay, just checked the README for this project; a new heading Code Linting in the Introduction to Contributing section sounds good.

Better title, "Applying Lint Styleguide"

diivi commented 1 year ago

What do you think about using husky for these tasks too? I can try to set one up for the format, test scripts. also checking semantic PRs client side could be easier with husky.

takanome-dev commented 1 year ago

Let's see now

@tmsagarofficial follow these steps and it should be good:

  1. In the root of the project, run npm run format
  2. Next, build the project to make sure it's all good: npm run build
  3. Add the changes: git add src/components/Footer.tsx 4. Commit and push
  4. Run npm run push
0-vortex commented 1 year ago

What do you think about using husky for these tasks too? I can try to set one up for the format, test scripts. also checking semantic PRs client side could be easier with husky.

Added

Let's see now

@tmsagarofficial follow these steps and it should be good:

  1. In the root of the project, run npm run format
  2. Next, build the project to make sure it's all good: npm run build
  3. Add the changes: git add src/components/Footer.tsx
  4. Commit and push πŸ•

@TAKANOME-DEV 4 should be: npm run push instead of commit if you want to really follow the docs!!!

0-vortex commented 1 year ago

@diivi @bdougie There is a work in progress on what the correct style guide for the frontend is, both feeding off the backend rules but not consolidated. While hot and insights have diverged in that manner, we did not have the time or resources to unify the rules and only apply the generic npm run format for eslint fixing in a holistic way. The reason it's somewhat performant is that our configuration is currently made up only of auto-format rules, meaning running lint --fix would generally solve most issues.

Because there are multiple ways a user can overload this, like the OP is potentially using IDE formatting, we should only document how to use them and potential bottlenecks. Part of the triage/maintainer docs on this are already live, while the introduction to contributing doesn't go into much detail. Would love sections like "how to open your first issue" or "how to open your first commit" but feel like that doesn't solve OP problem :<

bdougie commented 1 year ago

There is a work in progress on what the correct style guide for the frontend is, both feeding off the backend rules but not consolidated. While hot and insights have diverged in that manner, we did not have the time or resources to unify the rules and only apply the generic npm run format for eslint fixing in a holistic way.

Adding reference to npm run format is all that is needed in the docs. We don't need to list out the style guide.

tmsagarofficial commented 1 year ago

Let's see now

@tmsagarofficial follow these steps and it should be good:

  1. In the root of the project, run npm run format
  2. Next, build the project to make sure it's all good: npm run build
  3. Add the changes: git add src/components/Footer.tsx ~4. Commit and push~
  4. Run npm run push

Will try these