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

front: add typescript rule for import types and eslint rule for import sorting #6550

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

SharglutDev
Copy link
Contributor

@SharglutDev SharglutDev commented Feb 1, 2024

close #6544
close #6782

  • add verbatimModuleSyntax: true in tsconfig.json to display type imports errors
  • add "@typescript-eslint/consistent-type-imports": "error" in .eslintrc to trigger warnings for type impots when running eslint
  • add eslint rule in .eslintrc for import sorting in this order : react, external libs, internal files in absolute path, internal files in relative path

@SharglutDev SharglutDev requested a review from a team as a code owner February 1, 2024 15:44
@SharglutDev SharglutDev force-pushed the pfn/front/add-auto-type-import branch from 35a7a5b to 9adf33b Compare February 1, 2024 15:55
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: Patch coverage is 12.97487% with 1489 lines in your changes are missing coverage. Please review.

Project coverage is 28.27%. Comparing base (d5fd205) to head (d5fcf1b).
Report is 2 commits behind head on dev.

Files Patch % Lines
front/src/applications/editor/Editor.tsx 0.00% 21 Missing and 1 partial ⚠️
front/src/applications/referenceMap/Map.tsx 0.00% 22 Missing ⚠️
front/src/common/Map/Layers/GeoJSONs.tsx 0.00% 21 Missing ⚠️
...ols/routeEdition/components/RouteEditionLayers.tsx 0.00% 20 Missing ⚠️
...src/applications/stdcm/views/StdcmRequestModal.tsx 0.00% 20 Missing ⚠️
front/src/applications/editor/Map.tsx 0.00% 19 Missing ⚠️
...ons/operationalStudies/views/SimulationResults.tsx 0.00% 19 Missing ⚠️
front/src/common/Map/WarpedMap/WarpedMap.tsx 0.00% 18 Missing and 1 partial ⚠️
.../pointEdition/components/PointEditionLeftPanel.tsx 0.00% 16 Missing and 1 partial ⚠️
front/src/applications/editor/tools/utils.ts 0.00% 17 Missing ⚠️
... and 240 more
Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #6550      +/-   ##
============================================
- Coverage     28.31%   28.27%   -0.05%     
  Complexity     2177     2177              
============================================
  Files          1048     1048              
  Lines        129635   129976     +341     
  Branches       2577     2577              
============================================
+ Hits          36710    36754      +44     
- Misses        91436    91733     +297     
  Partials       1489     1489              
Flag Coverage Δ
core 79.39% <ø> (ø)
editoast 75.88% <ø> (-0.03%) ⬇️
front 8.62% <12.97%> (+0.01%) ⬆️
gateway 2.50% <ø> (ø)
railjson_generator 87.26% <ø> (ø)
tests 83.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SharglutDev SharglutDev force-pushed the pfn/front/add-auto-type-import branch 4 times, most recently from 94a1a8e to f655644 Compare February 1, 2024 18:45
@SharglutDev SharglutDev marked this pull request as draft February 2, 2024 16:18
@SharglutDev SharglutDev force-pushed the pfn/front/add-auto-type-import branch 4 times, most recently from e4a40ab to 08268a1 Compare March 1, 2024 15:54
@SharglutDev SharglutDev force-pushed the pfn/front/add-auto-type-import branch from 08268a1 to bd86e2b Compare March 1, 2024 16:08
@SharglutDev SharglutDev marked this pull request as ready for review March 1, 2024 16:42
@SharglutDev SharglutDev force-pushed the pfn/front/add-auto-type-import branch from 78290ba to d5fcf1b Compare March 1, 2024 17:40
Copy link
Contributor

@clarani clarani left a comment

Choose a reason for hiding this comment

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

LGTM, super nice work !!

@clarani clarani enabled auto-merge March 1, 2024 17:46
@clarani clarani added this pull request to the merge queue Mar 1, 2024
Merged via the queue into dev with commit 4f7b93f Mar 1, 2024
22 checks passed
@clarani clarani deleted the pfn/front/add-auto-type-import branch March 1, 2024 17:57
@SharglutDev SharglutDev changed the title front: add type import check in eslint front: add typescript rule for import types and eslint rule for import sorting Mar 1, 2024
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.

Add import sorting Add auto type imports in front
2 participants