Skip to content

chore: add ESLint, Prettier, Husky and lint-staged configs#63

Open
Olena008 wants to merge 3 commits into
mate-academy:mainfrom
Olena008:task_solution
Open

chore: add ESLint, Prettier, Husky and lint-staged configs#63
Olena008 wants to merge 3 commits into
mate-academy:mainfrom
Olena008:task_solution

Conversation

@Olena008

@Olena008 Olena008 commented Mar 3, 2026

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

I am requesting a few changes before this can be approved. You've done a great job structuring the tests with the Page Object Model, but the main goal of setting up the code quality tools isn't fully met yet.

Here are the key issues to address:

  • ESLint Configuration: In eslint.config.mjs, the Prettier configuration (eslint-config-prettier) must be the last item in the exported array. This is crucial for it to correctly disable conflicting formatting rules from other plugins. [CHECKLIST ITEM #1]
  • Husky Pre-commit Hook: The setup isn't working as expected. For example, the HomePage.js file has an unused this.page variable, which is an ESLint error that should have prevented the commit. Please review your Husky and Lint-Staged setup to ensure it blocks commits with linting errors. [CHECKLIST ITEM #3], [CHECKLIST ITEM #4]
  • Flaky Test: In tests/signUp/signUpPositive.spec.js, the generated username can sometimes be longer than the allowed 40 characters, causing the test to fail randomly. Please adjust the data generation to ensure the username always has a valid length.

Once these items are fixed, the solution will be in great shape. Keep up the good work!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread eslint.config.mjs Outdated
Comment thread eslint.config.mjs Outdated
Comment thread eslint.config.mjs Outdated
Comment thread src/pages/HomePage.js Outdated
Comment thread tests/signUp/signUpPositive.spec.js Outdated

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Great job on fixing the ESLint and Husky configurations! The code quality tools are now set up correctly.

However, I am requesting changes because the issue with the flaky test data in tests/signUp/signUpPositive.spec.js still needs to be addressed. As noted in the previous review, the current method for generating a username can create a string longer than the 40-character limit, which will cause the test to fail intermittently.

To fix this, please modify the data generation to ensure the username's length is always valid. You could, for example, slice the generated string or use a different faker method like faker.internet.userName().


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread tests/signUp/signUpPositive.spec.js Outdated

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]

If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Excellent work on this submission! I am approving your solution as you've perfectly addressed all the requirements. You did a fantastic job resolving the flaky test by implementing a robust userFactory that handles username length correctly. The project setup, including the ESLint [CHECKLIST ITEM #1], Prettier [CHECKLIST ITEM #2], and Husky configurations [CHECKLIST ITEM #3], is flawless. The code is clean, well-structured, and follows best practices. Great job!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants