Skip to content

Conversation

@PorePranav
Copy link
Contributor

@PorePranav PorePranav commented Oct 9, 2024

Implemented Linting and Formatting for Frontend and Backend

Summary:

This PR introduces proper linting and formatting configurations and fixes #84 using Prettier and ESLint for both the frontend and backend projects.

Changes:

  • Added ESLint configuration to both the frontend and backend.
  • Added Prettier configuration to ensure consistent code formatting.
  • Created lint, lint:fix, and format npm scripts for both frontend and backend to make it easy to check and fix linting/formatting issues.

Steps to get linting and formatting working:

  1. Review the Configuration: Before running any commands, please check the .eslintrc and .prettierrc config files in both the frontend and backend folders.

    • Feel free to adjust the configurations according to your preference.
  2. Run Commands:

    • After reviewing and possibly modifying the configurations, run the following commands to check and fix linting and formatting errors:

      Frontend:

      npm run lint
      npm run lint:fix
      npm run format

      Backend:

      npm run lint
      npm run lint:fix
      npm run format

Note:

I have not run the linting and formatting commands myself to avoid making unnecessary changes. Please run them after reviewing the configuration to fix any existing errors and apply the formatting changes.

Thank you!

@vercel
Copy link

vercel bot commented Oct 9, 2024

@PorePranav is attempting to deploy a commit to the Vishal Kumar 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vishalverma9572
Copy link
Owner

@PorePranav , Let me review this carefully.

@vercel
Copy link

vercel bot commented Oct 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
quiz-master-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2024 8:57pm
quiz-master-frontend ❌ Failed (Inspect) Oct 18, 2024 8:57pm

@PorePranav
Copy link
Contributor Author

Hi @vishalverma9572,
Any update on the PR? You won’t be able to deploy the frontend directly, as the linter might throw errors. Without fixing the linting issues, the frontend won't run. I could have handled this myself, but it’s better that the project maintainer does it. I’ve added the steps in the PR description. If you need any modifications or adjustments, I’m happy to help!

@vishalverma9572
Copy link
Owner

@PorePranav, I'm facing several issues while deploying, including multiple syntax errors. Could you please help me with this? Additionally, please avoid pushing changes to package-lock.json. If possible, could you try to run this on your computer? After that, please create a fresh PR again after closing this one.

Regarding your recent PR #138 , please react on that as soon as possible so that I can merge it.

Thank you!

@PorePranav
Copy link
Contributor Author

@PorePranav, I'm facing several issues while deploying, including multiple syntax errors. Could you please help me with this? Additionally, please avoid pushing changes to package-lock.json. If possible, could you try to run this on your computer? After that, please create a fresh PR again after closing this one.

Regarding your recent PR #138 , please react on that as soon as possible so that I can merge it.

Thank you!

The syntax errors are due to the fact that a proper linter was added, you need to fix all the syntax errors before you try to deploy the project, I could have done it myself but that would result in a massive refactor so I though it was a good idea that the project owner does it themselves. But if you want I can do the refactor myself, no issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Formatting and Linting Commands Using ESLint and Prettier

2 participants