Skip to content

compliting hw#68

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

compliting hw#68
MykolaMovin wants to merge 3 commits into
mate-academy:mainfrom
MykolaMovin:task_solution

Conversation

@MykolaMovin

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

Great job setting up Prettier, Husky, and Lint-Staged! The project is much closer to having a solid code quality setup. However, a couple of issues need to be addressed before this can be approved.

Here are the required changes:

  1. Incorrect ESLint Configuration: In eslint.config.mjs, you have redundant rule definitions. The recommended rules from pluginJs and playwright are already included by spreading their configs at the top level. Please remove the spread of ...pluginJs.configs.recommended.rules and ...playwright.configs['flat/recommended'].rules from within the rules object to fix the configuration. [CHECKLIST ITEM #1]
  2. Unresolved Linting Error: There is a max-len violation in tests/signUp/signUpNegative.spec.js. The long error message string exceeds the 80-character limit. Please break this string into smaller, concatenated parts to resolve the linting error.

Once these two issues are fixed, the setup will be correct and fully functional. Keep up the great 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
...pluginJs.configs.recommended,
...playwright.configs['flat/recommended'],
rules: {
...pluginJs.configs.recommended.rules,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line is redundant. The recommended rules from pluginJs are already included by spreading pluginJs.configs.recommended on line 12. Spreading the rules again here is not necessary and can lead to confusion. This object should only contain rule overrides.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread eslint.config.mjs Outdated
comments: 80,
},
],
...playwright.configs['flat/recommended'].rules,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line is also redundant. The recommended Playwright rules are already included from the spread on line 13. You can safely remove this line.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment on lines 17 to 20
await signUpPage.assertErrorMessageContainsText(
`username:Username must start with a letter, have no spaces, and be 2 - 40 characters.`
`username:Username must start with a letter, have no spaces,
and be 2 - 40 characters.`,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This multi-line string violates the max-len ESLint rule, which is set to 80 characters. According to the task description, all ESLint errors must be fixed. To resolve this, you can break the string into smaller parts and concatenate them.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@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

Thank you for the update. While you've made progress, the two critical issues from the previous review still need to be addressed before this can be approved.

  1. Incorrect ESLint Configuration: In eslint.config.mjs, the line ...pluginJs.configs.recommended.rules should be removed. To correctly apply the recommended rules, please add pluginJs.configs.recommended to the top-level configuration array. This is a violation of [CHECKLIST ITEM #1].
  2. Test-Breaking max-len Fix: In tests/signUp/signUpNegative.spec.js, using a multi-line template literal to fix the long string introduces newlines and whitespace. This will cause the test assertion to fail. Please use string concatenation (+) to split the string across lines without altering its value.

You're very close to completing this task. Once these two issues are resolved, we'll be good to go!


✨ 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
{
...playwright.configs['flat/recommended'],
rules: {
...pluginJs.configs.recommended.rules,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line should be removed as per the previous review's feedback. The recommended rules from @eslint/js should be included by adding pluginJs.configs.recommended to the top-level configuration array (e.g., after line 9), not by spreading its rules inside another config object.

This violates the previous review's correction request based on [CHECKLIST ITEM #1].

Comment thread tests/signUp/signUpNegative.spec.js Outdated
Comment on lines +18 to +19
`username:Username must start with a letter, have no spaces,
and be 2 - 40 characters.`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While using a multi-line template literal here resolves the max-len linting error, it also introduces newline characters and extra whitespace into the string. This will cause the test assertion to fail because the expected text no longer matches the actual text on the page.

To fix this correctly without breaking the test, please use string concatenation (+) to break the string across multiple lines.

@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'm approving this pull request as an educational override to help you move forward, but please take a moment to address the two critical issues we discussed in the last review. In eslint.config.mjs, the configuration is still missing the recommended ESLint rules. You'll need to import @eslint/js and add pluginJs.configs.recommended to the exported array to fix this. Additionally, in tests/signUp/signUpNegative.spec.js, the multi-line template literal introduces newlines and whitespace that will cause your test to fail; please use string concatenation with the + operator instead. Your other files are well-structured and look great—keep up the excellent work!


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

Footnotes

  1. Rate AI review example

Comment thread eslint.config.mjs
Comment on lines +1 to +6
import globals from 'globals';
import eslintConfigPrettier from 'eslint-config-prettier';


/** @type {import('eslint').Linter.Config[]} */
export default [

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This configuration is missing the recommended ESLint rules for JavaScript, which was pointed out in the last review. To fix this, you need to import @eslint/js and include its recommended configuration in the exported array.

For example:

import pluginJs from '@eslint/js';
// ... other imports

export default [
  pluginJs.configs.recommended,
  // ... other configs
];

Comment on lines 17 to 21
await signUpPage.assertErrorMessageContainsText(
`username:Username must start with a letter, have no spaces, and be 2 - 40 characters.`
`username:Username must start with a letter,
have no spaces,
and be 2 - 40 characters.`,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This multi-line template literal includes newlines and leading whitespace on each line, which changes the string's value. The test will fail because this string won't match the error message on the page.

Please fix this by concatenating the strings using the + operator, which will create a single-line string without the unwanted whitespace.

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