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

chore(biome): enable use import type rule #5985

Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 42 additions & 0 deletions .changeset/weak-trees-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
"@refinedev/ably": patch
"@refinedev/airtable": patch
"@refinedev/antd": patch
"@refinedev/appwrite": patch
"@refinedev/chakra-ui": patch
"@refinedev/cli": patch
"@refinedev/codemod": patch
"@refinedev/core": patch
"@refinedev/devtools": patch
"@refinedev/devtools-internal": patch
"@refinedev/devtools-server": patch
"@refinedev/devtools-shared": patch
"@refinedev/devtools-ui": patch
"@refinedev/graphql": patch
"@refinedev/hasura": patch
"@refinedev/inferencer": patch
"@refinedev/kbar": patch
"@refinedev/mantine": patch
"@refinedev/medusa": patch
"@refinedev/mui": patch
"@refinedev/nestjs-query": patch
"@refinedev/nestjsx-crud": patch
"@refinedev/nextjs-router": patch
"@refinedev/react-hook-form": patch
"@refinedev/react-router-v6": patch
"@refinedev/react-table": patch
"@refinedev/remix-router": patch
"@refinedev/simple-rest": patch
"@refinedev/strapi": patch
"@refinedev/strapi-v4": patch
"@refinedev/supabase": patch
"@refinedev/ui-tests": patch
"@refinedev/ui-types": patch
---

chore: added `type` qualifier to imports used as type only.

```diff
- import { A } from "./example.ts";
+ import type { A } from "./example.ts";
```
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"lineWidth": 80
},
"javascript": {
"jsxRuntime": "reactClassic",
"formatter": {
"arrowParentheses": "always",
"quoteStyle": "double",
Expand Down Expand Up @@ -93,7 +94,7 @@
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"useTemplate": "error",
"useImportType": "off",
"useImportType": "error",
"useNodejsImportProtocol": "off"
},
"suspicious": {
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands/intercepts/hasura.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CyHttpMessages } from "cypress/types/net-stubbing";
import type { CyHttpMessages } from "cypress/types/net-stubbing";
import hasuraBlogPosts from "../../../fixtures/hasura-blog-posts.json";
import hasuraCategories from "../../../fixtures/hasura-categories.json";

Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands/intercepts/supabase.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types="cypress" />
/// <reference types="../../index.d.ts" />

import { ICategory, IPost } from "../../types";
import type { ICategory, IPost } from "../../types";

const HOSTNAME = "iwdfzvfqbtokqetmbmbp.supabase.co";
const BASE_PATH = "/rest/v1";
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import posts from "../../fixtures/posts.json";
import categories from "../../fixtures/categories.json";
import type posts from "../../fixtures/posts.json";
import type categories from "../../fixtures/categories.json";

export type IPost = (typeof posts)[number];
export type ICategory = (typeof categories)[number];
2 changes: 1 addition & 1 deletion documentation/src/assets/examples.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PageIcon } from "@site/src/refine-theme/icons/page";
import { ShareIcon } from "@site/src/refine-theme/icons/share";
import React from "react";
import { Examples } from "../types/examples";
import type { Examples } from "../types/examples";

export const SHOW_CASES: Examples = [
{
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/ably.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgAbly = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/airtable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgAirtable = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/antd.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgAntd = ({
withBrandColor = true,
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/appwrite.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgAppwrite = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/atlassian.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgAtlassian = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/auth-js.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgAuthJs = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/auth0.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgAuth0 = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/aws-cognito.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgAwsCognito = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgAzureActiveDirectory = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/chakra.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgChakra = ({
withBrandColor = true,
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/clerk.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgClerk = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/custom-auth.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { SVGProps } from "react";
import React, { type SVGProps } from "react";

const CustomAuthIcon = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/directus.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgDirectus = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/dp.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgDp = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgElideGraphql = ({ className, ...props }: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/elide.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgElide = ({ className, ...props }: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/entrefine.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgEntRefine = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/expo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgExpo = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/firebase.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgFirebase = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/google.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgGoogle = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/graphql.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgGraphql = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/hasura.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgHasura = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/headless.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgHeadless = ({
withBrandColor = true,
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/hook-form.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgHookForm = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/hygraph.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgHygraph = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/json-api.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgJSONApi = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/kbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgKbar = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/kinde.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgKinde = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/mantine.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgMantine = ({
withBrandColor = true,
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/medusa.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgMedusa = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/mongodb.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const MsSqlServer = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const MsSqlServer = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/mui.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgMui = ({
withBrandColor = true,
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/mysql.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const MySQL = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/nest-query.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgNestQuery = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/nest.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgNest = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/nextjs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgNextjs = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/okta.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgOkta = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/oracle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgOracle = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/pocketbase.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const PocketBase = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/postgresql.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const PostgreSQL = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
2 changes: 1 addition & 1 deletion documentation/src/assets/integration-icons/react.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { SVGProps } from "react";
import type { SVGProps } from "react";

const SvgReact = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
Loading
Loading