Skip to content

Commit

Permalink
all: remove dist/ JS imports
Browse files Browse the repository at this point in the history
Instead, import from the package itself. That way we can ensure
we're only importing public API and we're not messing with
internal types.

Drop the eslint-disable import/no-unresolved comments, because
these errors aren't triggered anymore.

Signed-off-by: Simon Ser <[email protected]>
  • Loading branch information
emersion committed Feb 24, 2025
1 parent 904849b commit 9cb3b0a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions ui-manchette-with-spacetimechart/src/assets/sampleData.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable import/no-unresolved */
import { type ProjectPathTrainResult, type Waypoint } from '@osrd-project/ui-manchette/dist/types';
import { type ProjectPathTrainResult, type Waypoint } from '@osrd-project/ui-manchette';

export const SAMPLE_WAYPOINTS: Waypoint[] = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { useCallback, useEffect, useMemo, useState } from 'react';

import type { ProjectPathTrainResult, Waypoint } from '@osrd-project/ui-manchette/dist/types';
import type {
SpaceScale,
SpaceTimeChartProps,
} from '@osrd-project/ui-spacetimechart/dist/lib/types';
import type { ProjectPathTrainResult, Waypoint } from '@osrd-project/ui-manchette';
import type { SpaceScale, SpaceTimeChartProps } from '@osrd-project/ui-spacetimechart';

import usePaths from './usePaths';
import { MAX_ZOOM_Y, MIN_ZOOM_Y, ZOOM_Y_DELTA, DEFAULT_ZOOM_MS_PER_PX } from '../consts';
Expand Down
3 changes: 1 addition & 2 deletions ui-manchette-with-spacetimechart/src/hooks/usePaths.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable import/no-unresolved */
import { useMemo } from 'react';

import { type ProjectPathTrainResult } from '@osrd-project/ui-manchette/dist/types';
import { type ProjectPathTrainResult } from '@osrd-project/ui-manchette';
import { type PathLevel } from '@osrd-project/ui-spacetimechart';

import { PATH_COLOR_DEFAULT } from '../consts';
Expand Down

0 comments on commit 9cb3b0a

Please sign in to comment.