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

Added new TypeScript rules #2106

Merged

Conversation

Alex-NRCan
Copy link
Member

@Alex-NRCan Alex-NRCan commented May 8, 2024

Description

This PR adds new TypeScript rules to facilitate development and implement best practices.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Hosting May 9th 8h50: https://alex-nrcan.github.io/geoview/

Checklist:

  • I have build (rush build) and deploy (rush host) my PR
  • I have connected the issues(s) to this PR
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have created new issue(s) related to the outcome of this PR is needed
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

This change is Reviewable

@Alex-NRCan Alex-NRCan self-assigned this May 8, 2024
@Alex-NRCan Alex-NRCan force-pushed the feat-rule-static branch 2 times, most recently from 1130b0a to e1e97d6 Compare May 8, 2024 19:51
@jolevesq jolevesq requested review from ychoquet and jolevesq May 8, 2024 20:02
@Alex-NRCan Alex-NRCan force-pushed the feat-rule-static branch 2 times, most recently from 0563533 to 8a4d29e Compare May 8, 2024 20:06
Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

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

Reviewed 82 of 86 files at r1, 4 of 5 files at r2, 1 of 2 files at r3, 1 of 1 files at r4, 13 of 13 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: all files reviewed, 9 unresolved discussions (waiting on @Alex-NRCan and @ychoquet)


packages/geoview-core/src/api/config/uuid-config-reader.ts line 117 at r3 (raw file):

  }

  // TODO: Check - Commented out as not called anymore by method `getGVConfigFromUUIDs`, but maybe it should still?

Like we discuss it should be called, we will update in a next PR


packages/geoview-core/src/api/config/types/classes/sub-layer-config/config-base-class.ts line 23 at r3 (raw file):

  /** Used internally to distinguish layer groups derived from the metadata. */
  // #isMetadataLayerGroup?: false;

Can we put a TODO so we do not loose dead code


packages/geoview-core/src/core/components/common/layer-title.tsx line 35 at r5 (raw file):

}

// TODO: Refactor - Remove defaltProps as it's no longer a good practice

typo defaultProps


packages/geoview-core/src/core/components/common/layout.tsx line 79 at r5 (raw file):

}

// TODO: Refactor - Remove defaltProps as it's no longer a good practice

typo defaultProps


packages/geoview-core/src/core/components/common/responsive-grid.tsx line 138 at r5 (raw file):

};

// TODO: Refactor - Remove defaltProps as it's no longer a good practice

typo defaultProps


packages/geoview-core/src/core/components/common/responsive-grid-layout.tsx line 326 at r5 (raw file):

ResponsiveGridLayout.displayName = 'ResponsiveGridLayout';

// TODO: Refactor - Remove defaltProps as it's no longer a good practice

replace all...


packages/geoview-core/src/core/components/footer-bar/footer-bar.tsx line 6 at r3 (raw file):

import { Box, IconButton, Tabs, TypeTabs, MoveDownRoundedIcon, MoveUpRoundedIcon } from '@/ui';
import { api } from '@/app';

Another remove of api... yeah!


packages/geoview-core/src/geo/layer/geoview-layers/raster/esri-dynamic.ts line 437 at r3 (raw file):

   * the feature.
   */
  private static countFieldOfTheSameValue(styleSettings: TypeUniqueValueStyleConfig): TypeFieldOfTheSameValue[][] {

Should we put private #?


packages/geoview-core/src/geo/layer/geoview-layers/vector/ogc-feature.ts line 95 at r3 (raw file):

export class OgcFeature extends AbstractGeoViewVector {
  // private variable holding wfs version
  // private version = '2.0.0';

If not use, should we remove or put a TODO?

Copy link
Member Author

@Alex-NRCan Alex-NRCan left a comment

Choose a reason for hiding this comment

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

Reviewed 85 of 86 files at r1, 5 of 5 files at r2, 1 of 2 files at r3, 1 of 1 files at r4, 13 of 13 files at r5, 1 of 1 files at r6, 16 of 16 files at r7.
Reviewable status: all files reviewed (commit messages unreviewed), 6 unresolved discussions (waiting on @jolevesq and @ychoquet)


packages/geoview-core/src/api/config/uuid-config-reader.ts line 117 at r3 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Like we discuss it should be called, we will update in a next PR

Done.


packages/geoview-core/src/api/config/types/classes/sub-layer-config/config-base-class.ts line 23 at r3 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Can we put a TODO so we do not loose dead code

Done.


packages/geoview-core/src/core/components/common/responsive-grid-layout.tsx line 326 at r5 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

replace all...

Done.


packages/geoview-core/src/core/components/footer-bar/footer-bar.tsx line 6 at r3 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Another remove of api... yeah!

Done.


packages/geoview-core/src/geo/layer/geoview-layers/raster/esri-dynamic.ts line 437 at r3 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Should we put private #?

Done.


packages/geoview-core/src/geo/layer/geoview-layers/vector/ogc-feature.ts line 95 at r3 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

If not use, should we remove or put a TODO?

Done.

Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

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

Reviewed 16 of 16 files at r7, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ychoquet)

@Alex-NRCan Alex-NRCan marked this pull request as ready for review May 9, 2024 03:03
Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 11 files at r8, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ychoquet)

Copy link
Member Author

@Alex-NRCan Alex-NRCan left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 11 files at r8, 11 of 11 files at r9, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ychoquet)

Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 11 files at r9, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ychoquet)

@jolevesq jolevesq merged commit 34e063e into Canadian-Geospatial-Platform:develop May 9, 2024
6 checks passed
@Alex-NRCan Alex-NRCan deleted the feat-rule-static branch May 21, 2024 13:17
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.

2 participants