Skip to content

Conversation

ajay-dhangar
Copy link
Member

Description

It is always recommended to group all imports of a single path or source in a single import declaration. These usually happen in a codebase when multiple developers are working on the same codebase. It helps improving code refactoring and code readability as well.

Bad Practice

// <!-- index.js -->

import calc from './calc.js'
import { add } from './calc.js'

console.log(add(1, 2))

Recommended

// <!-- index.js -->

import calc,  { add }  from './calc.js'

console.log(add(1, 2))

Copy link

@github-actions github-actions bot 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, @ajay-dhangar! 🎉 Thank you for submitting your pull request to CodeHarborHub. We appreciate your contribution and enthusiasm! Our team will review it soon. If you have any questions or need further assistance, feel free to reach out. Thanks for contributing!

Copy link
Contributor

deepsource-io bot commented Sep 22, 2024

Here's the code health analysis summary for commits 829689f..fcc6376. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ Success
🎯 2 occurences resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

⚡️ Lighthouse Report for the Deploy Preview of this PR 🚀

🔗 Site: CodeHarborHub | Live Site

URL 🌐 Performance Accessibility Best Practices SEO 📊
/ 🔴 31 🟡 82 🟡 75 🟢 100 📄
/docs 🔴 46 🟢 90 🟢 96 🟢 100 📄
/docs/category/javascript 🟡 52 🟢 90 🟢 96 🟢 100 📄
/courses 🔴 49 🟢 90 🟢 96 🟢 100 📄
/courses/category/reactjs 🟡 60 🟢 90 🟢 96 🟢 100 📄
/dsa-problems 🟡 53 🟢 90 🟢 96 🟢 100 📄
/dsa-problems/category/leetcode-problems 🟡 55 🟢 90 🟢 96 🟢 100 📄
/dsa-solutions 🟡 52 🟢 90 🟢 96 🟢 100 📄
/dsa-solutions/category/leetcode-solutions 🟡 53 🟢 90 🟢 96 🟢 100 📄
/blog 🟡 52 🟢 90 🟢 96 🟡 86 📄
/showcase 🟡 52 🟢 91 🟡 75 🟡 86 📄
/community 🟡 51 🟢 90 🟢 96 🟢 100 📄
/docs/tags 🟡 50 🟢 90 🟢 96 🟡 86 📄

@ajay-dhangar ajay-dhangar added the bug Something isn't working label Sep 22, 2024
@ajay-dhangar ajay-dhangar merged commit b494f95 into main Sep 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant