Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finished #372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

finished #372

wants to merge 1 commit into from

Conversation

Fluebubble
Copy link

No description provided.

Copy link

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

Choose a reason for hiding this comment

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

Great job on meeting the core requirements of the task! 🎉 While there are some minor improvements suggested, such as enhancing error messages for clarity and adjusting the ESLint configuration for better readability, these do not impact the functionality of your code. Keep up the good work, and consider these suggestions for future enhancements! 😊

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

Comment on lines 6 to +9
rules: {
'no-proto': 0
'no-proto': 0,
},
plugins: ['jest']
plugins: ['jest'],

Choose a reason for hiding this comment

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

Consider placing the 'plugins' property before the 'rules' property for better readability and to follow conventional ESLint configuration order.


return stats.isDirectory();
} catch (error) {
console.error(error);

Choose a reason for hiding this comment

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

Consider providing a more descriptive error message here to help with debugging.

// console.log('start');
//
if (!destinationPath) {
console.error('no second param');

Choose a reason for hiding this comment

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

Consider providing a more descriptive error message here to help with debugging.


try {
if (await isDirectory(sourcePath)) {
console.error('sourcePath is the directory');

Choose a reason for hiding this comment

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

Consider providing a more descriptive error message here to help with debugging.


try {
if (await isDirectory(destinationPath)) {
console.error('destinationPath is the directory');

Choose a reason for hiding this comment

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

Consider providing a more descriptive error message here to help with debugging.

Comment on lines +42 to +44
if (sourcePath === destinationPath) {
return;
}

Choose a reason for hiding this comment

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

When the source and destination paths are the same, consider providing a warning message to inform the user that no action was taken.

await fs.access(sourcePath, fs.constants.F_OK);
// console.log('copyFile');
} catch (err) {
console.error('Файл не существует');

Choose a reason for hiding this comment

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

Consider providing a more descriptive error message here to help with debugging.

await fs.cp(sourcePath, destinationPath);
// console.log('file copied');
} catch (err) {
// console.error(err);

Choose a reason for hiding this comment

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

Consider uncommenting this line if you want to log errors during the file copy operation, or remove it if it's not needed.

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