Skip to content

Set up ESLint Prettier Husky and lint-staged Roman Artemchuk#91

Open
KoLpI76 wants to merge 4 commits into
mate-academy:mainfrom
KoLpI76:task_solution
Open

Set up ESLint Prettier Husky and lint-staged Roman Artemchuk#91
KoLpI76 wants to merge 4 commits into
mate-academy:mainfrom
KoLpI76:task_solution

Conversation

@KoLpI76

@KoLpI76 KoLpI76 commented Jun 29, 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 changes because the task explicitly requires a full setup of ESLint, Prettier, Husky, and lint-staged, and from the files provided only ESLint is clearly configured. There is no visible Prettier configuration file (e.g., .prettierrc or prettier.config.js), which means formatting rules from the theory instructions are not demonstrably applied. There is also no visible lint-staged configuration (in package.json or a separate config), and the Husky pre-commit hook setup is not shown, so we cannot confirm that commits are actually blocked when ESLint or Prettier report errors. These missing pieces are critical blockers for the assignment because the core requirement is to have tooling run automatically on commit and enforce lint/format correctness.

To fix this, you should: 1) add a Prettier config and ensure it matches the theory instructions, 2) configure lint-staged to run ESLint and Prettier on staged files, and 3) update your Husky pre-commit hook to invoke npx lint-staged so that commits fail on lint/format errors. Once these are in place, run npx eslint over the project and perform a test commit to verify that the hook blocks commits when there are ESLint/Prettier issues. Your ESLint flat config and Playwright page objects/tests look solid, so after wiring the missing tooling pieces, you should be in good shape to complete the task successfully.


✨ 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

@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 approving your solution because all four required tools—ESLint, Prettier, Husky, and lint-staged—are now correctly configured and integrated, and there are no remaining critical blockers to completing the task. ESLint is set up with a flat config and your Playwright page objects and tests are syntactically clean and compatible with it, satisfying the linting requirements from the task. Prettier is configured via a dedicated config file, and lint-staged is wired to run both eslint --fix and prettier --write on staged files, which aligns with the requirement to automatically lint and format code before commits. Husky’s pre-commit hook calls npx lint-staged, which is exactly what is needed for git commit to surface ESLint/Prettier errors and block the commit until they’re fixed. While I cannot see actual terminal output or test logs, the configuration you’ve committed is consistent with the described behavior in the checklist and should enforce the required workflow. As a minor improvement, I recommend you manually confirm that a test commit with an intentional lint error is indeed blocked, and mention that verification in your PR description for clarity. Overall, you’ve addressed the earlier tooling gaps well and your setup now meets the assignment’s core requirements.


✨ 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