camicroscope / caMicroscope

Digital pathology image viewer with support for human/machine generated annotations and markups.
BSD 3-Clause "New" or "Revised" License
249 stars 289 forks source link

Functions wriitten without following "linting" principles #846

Open gbengaoluwadahunsi opened 6 months ago

gbengaoluwadahunsi commented 6 months ago

Bug Description: Functions written in the camicroscope repository do not adhere to linting principles. Linting rules are not followed, resulting in code that violates style guidelines and best practices.

Reproduction Steps:

Navigate to the camicroscope repository. Inspect the codebase and observe functions that do not comply with linting rules. Review the commit history to identify instances of non-compliant code. Analyze the codebase using linting tools to identify specific violations. Expected Behavior: Functions should be written in accordance with linting principles specified in the project's eslint configuration. Code should adhere to established style guidelines and best practices.

Importance of Fixing:

Code Consistency: Enforcing linting rules ensures consistency across the codebase, making it easier for developers to understand and maintain the code. Readability: Consistent code formatting enhances readability, reducing the time required for code review and debugging. Code Quality: Adhering to linting rules helps identify potential errors, bugs, and anti-patterns in the code, leading to improved overall code quality. Team Collaboration: Consistent coding standards facilitate collaboration among team members, as everyone follows the same conventions and practices. Maintainability: Well-formatted code is easier to maintain and extend, reducing technical debt and long-term maintenance costs. Additional Context: Linting is a crucial aspect of the software development process, contributing to code quality, maintainability, and overall project success. By addressing linting issues in the camicroscope repository, we can enhance the codebase's quality and ensure alignment with industry best practices. Your contributions in resolving these issues are greatly appreciated and will positively impact the project's long-term success.

WHEN I OPENED THE FILE linting

AFTER RUNNING TERMINAL COMMAND LINES THAT CONSOLES THE ERROR lint2

AFTER FIXING IT Screenshot 2024-03-22 224610

Lochipi commented 6 months ago

Hi there @gbengaoluwadahunsi , was this sln merged? need some clarification to work on my pr which may cause conflicts if I won't update it

gbengaoluwadahunsi commented 6 months ago

Hello @Lochipi ; Not yet as I think @birm will soon look into the PR and merge them, I will suggest you just make all your PRs, hoping @birm will attend to them soon.

There have been a lot of PRs for the project in the past 3+ weeks so I think it will be a while for @birm and other assigned contributors to attend to all PRs and issues.

Lochipi commented 6 months ago

sure, can you show me how you did it? I need to do mine to avoid future collisions.

On Mon, 25 Mar 2024 at 09:39, Gbenga Oluwadahunsi @.***> wrote:

Hello @Lochipi https://github.com/Lochipi ; Not yet as I think @birm https://github.com/birm will soon look into the PR and merge them, I will suggest you just make all your PRs, hoping @birm https://github.com/birm will attend to them soon.

There have been a lot of PRs for the project in the past 3+ weeks so I think it will be a while for @birm https://github.com/birm and other assigned contributors to attend to all PRs and issues.

— Reply to this email directly, view it on GitHub https://github.com/camicroscope/caMicroscope/issues/846#issuecomment-2017324430, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ7FFSIG5BCQN7CVR76L4OTYZ7BBFAVCNFSM6AAAAABFDOTZIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJXGMZDINBTGA . You are receiving this because you were mentioned.Message ID: @.***>

gbengaoluwadahunsi commented 6 months ago

@Lochipi ,

here it its

Before sending the PR, make sure that there are no linting errors by running

  1. npm install eslint --save-dev
    1. npm run lint to see the errors and
    2. npm run lint-fix to automatically fix the errors in the repository folder.

so all you need to do is install lint as a dependency at the root of the folder you are working and that handles the problem of linting.

Lochipi commented 6 months ago

thanks. Lemme try.

On Mon, 25 Mar 2024 at 10:22, Gbenga Oluwadahunsi @.***> wrote:

@Lochipi https://github.com/Lochipi ,

here it its @birm https://github.com/birm said... It is highly recommended to make any changes off of the develop branch of a repository, and, when ready, create a PR to the develop branch of the source repository. Before sending the PR, make sure that there are no linting errors by running npm install and then npm run lint to see the errors and npm run lint-fix to automatically fix the errors in the repository folder.

so all you need to do is install lint as a dependency at the root of the folder you are working and that handles the problem of linting.

— Reply to this email directly, view it on GitHub https://github.com/camicroscope/caMicroscope/issues/846#issuecomment-2017372427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ7FFSJZJOK6L2PGFHG56ITYZ7GDNAVCNFSM6AAAAABFDOTZIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJXGM3TENBSG4 . You are receiving this because you were mentioned.Message ID: @.***>

gbengaoluwadahunsi commented 6 months ago

you are welcome