Skip to content

Commit

Permalink
fix: relative package imports (#4453)
Browse files Browse the repository at this point in the history
* test(lint): add eslint rule to prevent invalid imports

* fix: relative package imports

relative package imports (package/utils/src) is leading to a broken
build
  • Loading branch information
zettca authored Nov 26, 2024
1 parent 754b7d7 commit d4a16aa
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .eslintrc → .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@
},
"overrides": [
{
"files": ["packages/**/*.ts?(x)"],
"extends": ["plugin:ssr-friendly/recommended"]
// override for package source-code files
"files": ["packages/*/src/**/*.ts?(x)"],
"extends": ["plugin:ssr-friendly/recommended"],
"rules": {
"no-restricted-imports": ["error", { "patterns": ["packages/**"] }]
}
},
{
"files": ["**/*.stories.ts?(x)"],
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HvButtonBase } from "packages/core/src/ButtonBase";
import { type ExtractNames } from "@hitachivantara/uikit-react-utils";

import { HvButtonBase } from "../../../ButtonBase";
import { ViewMode } from "../../enums";
import { DateRangeProp, VisibilitySelectorActions } from "../../types";
import { getMonthNamesList } from "../../utils";
Expand Down
2 changes: 1 addition & 1 deletion packages/pentaho/src/Canvas/Toolbar/Toolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { forwardRef } from "react";
import { mergeStyles } from "packages/utils/src";
import {
ExtractNames,
HvBaseProps,
Expand All @@ -10,6 +9,7 @@ import {
useLabels,
} from "@hitachivantara/uikit-react-core";
import { Previous } from "@hitachivantara/uikit-react-icons";
import { mergeStyles } from "@hitachivantara/uikit-react-utils";

import { useCanvasContext } from "../CanvasContext";
import { staticClasses, useClasses } from "./Toolbar.styles";
Expand Down

0 comments on commit d4a16aa

Please sign in to comment.