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

Anti-pattern: (JS-0323) Fix #2039

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

davido-noowin
Copy link

This PR resolves #2030. Originally, leadminer/backend/src/utils/helpers/validation.ts had code that could not interact with the type change from any to unknown, but changes have been made. There is another if statement to check for the string type, as the original function only contained a check for type string[]. A unit test file has been made for this function called validation.test.ts

@CLAassistant
Copy link

CLAassistant commented Feb 4, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@maleksal maleksal left a comment

Choose a reason for hiding this comment

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

@davido-noowin, please correct your package.json files.

  • Remove the dependencies installed in the root package.json and install each one in its corresponding backend or frontend directory.
  • Remove this part from package.json
    "leadminer": "file:.."
    
  • Run npm run prettier:fix in frontend to fix formatting and npm run lint:fix to fix linting

package.json Outdated Show resolved Hide resolved
frontend/package.json Outdated Show resolved Hide resolved
@maleksal
Copy link
Collaborator

maleksal commented Feb 5, 2025

You’re still facing issues with package.json files. Here’s a quick fix:

  • Restore package.json and package-lock.json to their original states by copying them from the main branch of the remote Leadminer repository.

  • Delete the node_modules directories in both the backend and frontend.

  • Navigate to the root /leadminer directory and run: npm run install-deps

  • Move to the backend directory and run: npm run test:unit

This will validate your unit tests. If everything works fine, push your changes.

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.

Anti-pattern: (JS-0323) Detected usage of the any type
3 participants