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

Use import attributes when importing json files #1174

Merged
merged 4 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ playwright-report

# test-app specific
routeTree.gen.ts

# temporary until prettier is updated
useTranslation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/appui-react",
"comment": "Use import attributes for json imports.",
"type": "none"
}
],
"packageName": "@itwin/appui-react"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/components-react",
"comment": "Use import attributes for json imports.",
"type": "none"
}
],
"packageName": "@itwin/components-react"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-react",
"comment": "Use import attributes for json imports.",
"type": "none"
}
],
"packageName": "@itwin/core-react"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/imodel-components-react",
"comment": "Use import attributes for json imports.",
"type": "none"
}
],
"packageName": "@itwin/imodel-components-react"
}
2 changes: 1 addition & 1 deletion ui/appui-react/src/appui-react/hooks/useTranslation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion ui/core-react/src/core-react/l10n/useTranslation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading