Skip to content

Dependency Management and Redundancy #180

@codeCraft-Ritik

Description

@codeCraft-Ritik

Summary:

The package.json file includes development tools like eslint and eslint-config-next in the dependencies section. These should be in devDependencies because they are only needed for code quality checks during development, not for the production build to run. Additionally, the helper/repo.js file contains duplicate entries of the same repository data, increasing the bundle size unnecessarily.

Fix:
Move linting tools to devDependencies and clean up the static data arrays.

Corrected package.json Structure:

{
  "dependencies": {
    "flowbite": "^1.8.1",
    "moment": "^2.29.4",
    "next": "13.4.3",
    "next-themes": "^0.2.1",
    "next-usequerystate": "^1.7.2",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-icons": "^4.11.0",
    "react-infinite-scroll-component": "^6.1.0",
    "swr": "^2.2.4"
  },
  "devDependencies": {
    "eslint": "8.41.0",
    "eslint-config-next": "13.4.3",
    "autoprefixer": "^10.4.19",
    "postcss": "^8.4.38",
    "prettier": "3.0.3",
    "tailwindcss": "^3.4.4"
  }
}

Corrected findissues/helper/repo.js

// Remove duplicate identical objects to save memory and prevent UI duplication
export const repos = [
    {
        "id": 645750521,
        "name": "findissues",
        "full_name": "anand346/findissues",
        // ... (Keep only one instance of this object)
    }
];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions