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

chore(front): Refactor code to follow eslint rules #7

Merged
merged 16 commits into from
Nov 23, 2023
Merged

Conversation

cpvannier
Copy link
Member

@cpvannier cpvannier commented Nov 21, 2023

Description

Refactor code to successfully pass eslint check with less rules disabled.

Changes

Added

  • Add eslint check to GitHub actions

Changed

  • Refactor code to successfully pass eslint check with the following rules:
    • typescript-eslint/no-unsafe-return
    • typescript-eslint/no-unsafe-argument
    • typescript-eslint/no-explicit-any
    • typescript-eslint/no-strict-null-check
    • typescript-eslint/no-unnecessary-type-assertion
    • typescript-eslint/ban-types

Fixed

  • Fix stories

Copy link
Contributor

@timothee-LJN timothee-LJN left a comment

Choose a reason for hiding this comment

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

I did not comment on all type casting (const foo = bar as string - the as type part) but it should be avoided whenever we can. I think this article sums it up : https://dev.to/ylerjen/typescript-cast-is-a-type-breaker-1jbh

basicaly, if you cast a variable, you lose all confidence in TS. It sometimes means refactoring a bit though ! Let me know if you need some help !

ui/apps/explorer/src/ExplorationWorkspace.svelte Outdated Show resolved Hide resolved
ui/components/core/src/cell_types.ts Outdated Show resolved Hide resolved
ui/components/core/src/interfaces.ts Outdated Show resolved Hide resolved
ui/components/table/src/TableCells/HistogramCell.svelte Outdated Show resolved Hide resolved
@cpvannier cpvannier requested review from timothee-LJN and BertrandRenault and removed request for jrabary November 22, 2023 14:48
@cpvannier cpvannier self-assigned this Nov 23, 2023
@jrabary jrabary self-requested a review November 23, 2023 13:12
@jrabary jrabary merged commit 5c3b628 into develop Nov 23, 2023
10 checks passed
cpvannier added a commit that referenced this pull request Nov 24, 2023
Previously done in format_bbox function in backend
format_bbox was deleted in #7 to keep same format between front and back
cpvannier added a commit that referenced this pull request Nov 27, 2023
Previously done in format_bbox function in backend
format_bbox was deleted in #7 to keep same format between front and back
@cpvannier cpvannier deleted the chore/eslint branch December 5, 2023 12:27
@cpvannier cpvannier added scope: front Related to Pixano frontend enhancement New feature or request labels Dec 6, 2023
magwyz pushed a commit to magwyz/pixano that referenced this pull request Dec 13, 2023
Previously done in format_bbox function in backend
format_bbox was deleted in pixano#7 to keep same format between front and back
@cpvannier cpvannier added this to the Pixano 0.5.0 milestone Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope: front Related to Pixano frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants