gurpreet-legend / Alan-Feed

A user-friendly AI-assisted news application
https://alan-feed.netlify.app/
MIT License
4 stars 10 forks source link

[Improve] - Add prettier to the project #5

Open gurpreet-legend opened 1 year ago

gurpreet-legend commented 1 year ago

Improvements:

Here are steps to add prettier to Node projects, you can refer this article: https://blog.bitsrc.io/add-prettier-to-your-project-d7e91ac03d05

Harshwardhan-Patil commented 1 year ago

hey @gurpreet-legend , I'd like to work on this. Assign me

gurpreet-legend commented 1 year ago

Sure, you can work on this @Harshwardhan-Patil :)

Harshwardhan-Patil commented 1 year ago

Hey @gurpreet-legend ,I am getting problem while installing npm packages its giving error like INVALID VERSION. Is there problem in version value in package.json file? Can you plz help me?

Screenshot (89)
gurpreet-legend commented 1 year ago

@Harshwardhan-Patil, this should not happen, can you change the version to 1.0.0 and check if it installs all packages or not.

Harshwardhan-Patil commented 1 year ago

@gurpreet-legend ,this is not working and what is ansi-html-community

Screenshot (90)
gurpreet-legend commented 1 year ago

@Harshwardhan-Patil , try deleting the package-lock.json and reinstalling it, it might work

And ansi-html-community is a dependency library for alan-ai, I read about it, it converts ANSI text to HTML, something alan-ai needs internally to work, even if you remove it and try installing deps even then alan-ai will ask you to download it.

Harshwardhan-Patil commented 1 year ago

@gurpreet-legend ,It works.Thank you for helping me

Harshwardhan-Patil commented 1 year ago

Hey @gurpreet-legend ,I have solved this issue and created pull request.Plz review my PR and tell me if any changes you want.

Harshwardhan-Patil commented 1 year ago

Hey @gurpreet-legend ,

  1. Should I add .prettierignore file if yes which file you want to ignore me
  2. I check prettier install documentation they say "If you use ESLint, install eslint-config-prettier to make ESLint and Prettier play nice with each other Docs"
gurpreet-legend commented 1 year ago

Yes, you can do that as well, adding the prettier plugin with eslint also works fine. Also make sure to pull the recent changes before pushing your code :)

Harshwardhan-Patil commented 1 year ago

Which file/folder should I add to .prettierignore

Harshwardhan-Patil commented 1 year ago

Hey @gurpreet-legend ,I've created the pull request, but it gives me merge conflicts. Can you help me resolve those issues?