diff --git a/.prettierignore b/.prettierignore index 82904a8e2e6..6abdbaa8b43 100644 --- a/.prettierignore +++ b/.prettierignore @@ -31,3 +31,6 @@ playwright-report # test-app specific routeTree.gen.ts + +# temporary until prettier is updated +useTranslation.tsx diff --git a/common/changes/@itwin/appui-react/issue-1165_2025-01-15-15-07.json b/common/changes/@itwin/appui-react/issue-1165_2025-01-15-15-07.json new file mode 100644 index 00000000000..8a7d5bac5ec --- /dev/null +++ b/common/changes/@itwin/appui-react/issue-1165_2025-01-15-15-07.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/appui-react", + "comment": "Use import attributes for json imports.", + "type": "none" + } + ], + "packageName": "@itwin/appui-react" +} \ No newline at end of file diff --git a/common/changes/@itwin/components-react/issue-1165_2025-01-15-15-07.json b/common/changes/@itwin/components-react/issue-1165_2025-01-15-15-07.json new file mode 100644 index 00000000000..71b9c96ad0e --- /dev/null +++ b/common/changes/@itwin/components-react/issue-1165_2025-01-15-15-07.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/components-react", + "comment": "Use import attributes for json imports.", + "type": "none" + } + ], + "packageName": "@itwin/components-react" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-react/issue-1165_2025-01-15-15-07.json b/common/changes/@itwin/core-react/issue-1165_2025-01-15-15-07.json new file mode 100644 index 00000000000..909cbe388f8 --- /dev/null +++ b/common/changes/@itwin/core-react/issue-1165_2025-01-15-15-07.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-react", + "comment": "Use import attributes for json imports.", + "type": "none" + } + ], + "packageName": "@itwin/core-react" +} \ No newline at end of file diff --git a/common/changes/@itwin/imodel-components-react/issue-1165_2025-01-15-15-07.json b/common/changes/@itwin/imodel-components-react/issue-1165_2025-01-15-15-07.json new file mode 100644 index 00000000000..b51535f7d66 --- /dev/null +++ b/common/changes/@itwin/imodel-components-react/issue-1165_2025-01-15-15-07.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/imodel-components-react", + "comment": "Use import attributes for json imports.", + "type": "none" + } + ], + "packageName": "@itwin/imodel-components-react" +} \ No newline at end of file diff --git a/ui/appui-react/src/appui-react/hooks/useTranslation.tsx b/ui/appui-react/src/appui-react/hooks/useTranslation.tsx index ebf3fdfdd39..e54555bf891 100644 --- a/ui/appui-react/src/appui-react/hooks/useTranslation.tsx +++ b/ui/appui-react/src/appui-react/hooks/useTranslation.tsx @@ -2,7 +2,7 @@ * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ -import * as defaults from "../UiFramework.json"; +import * as defaults from "../UiFramework.json" with { type: "json" }; import * as React from "react"; import { usePackageTranslation } from "@itwin/core-react/internal"; import { UiFramework } from "../UiFramework.js"; diff --git a/ui/components-react/src/components-react/l10n/useTranslation.tsx b/ui/components-react/src/components-react/l10n/useTranslation.tsx index 948269763f3..0b4ae2df5af 100644 --- a/ui/components-react/src/components-react/l10n/useTranslation.tsx +++ b/ui/components-react/src/components-react/l10n/useTranslation.tsx @@ -2,7 +2,7 @@ * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ -import * as defaults from "../UiComponents.json"; +import * as defaults from "../UiComponents.json" with { type: "json" }; import * as React from "react"; import { usePackageTranslation } from "@itwin/core-react/internal"; import { UiComponents } from "../UiComponents.js"; diff --git a/ui/core-react/src/core-react/l10n/useTranslation.tsx b/ui/core-react/src/core-react/l10n/useTranslation.tsx index fd482ce01bd..0d1a4740a82 100644 --- a/ui/core-react/src/core-react/l10n/useTranslation.tsx +++ b/ui/core-react/src/core-react/l10n/useTranslation.tsx @@ -2,7 +2,7 @@ * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ -import * as defaults from "../UiCore.json"; +import * as defaults from "../UiCore.json" with { type: "json" }; import * as React from "react"; import { UiCore } from "../UiCore.js"; import { usePackageTranslation } from "./usePackageTranslation.js"; diff --git a/ui/imodel-components-react/src/imodel-components-react/useTranslation.tsx b/ui/imodel-components-react/src/imodel-components-react/useTranslation.tsx index 9c36886e5fb..c933bc02775 100644 --- a/ui/imodel-components-react/src/imodel-components-react/useTranslation.tsx +++ b/ui/imodel-components-react/src/imodel-components-react/useTranslation.tsx @@ -2,7 +2,7 @@ * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ -import * as defaults from "./UiIModelComponents.json"; +import * as defaults from "./UiIModelComponents.json" with { type: "json" }; import * as React from "react"; import { usePackageTranslation } from "@itwin/core-react/internal"; import { UiIModelComponents } from "./UiIModelComponents.js";