diff --git a/.pkgs/configs/eslint.js b/.pkgs/configs/eslint.js index 8d6ff70d93..e703efd91c 100644 --- a/.pkgs/configs/eslint.js +++ b/.pkgs/configs/eslint.js @@ -4,7 +4,6 @@ import pluginDeMorgan from "eslint-plugin-de-morgan"; import pluginJsdoc from "eslint-plugin-jsdoc"; import pluginPerfectionist from "eslint-plugin-perfectionist"; import pluginRegexp from "eslint-plugin-regexp"; -import pluginSimpleImportSort from "eslint-plugin-simple-import-sort"; import pluginUnicorn from "eslint-plugin-unicorn"; import tseslint from "typescript-eslint"; const GLOB_JS = ["*.{js,jsx,cjs,mjs}", "**/*.{js,jsx,cjs,mjs}"]; @@ -101,7 +100,6 @@ export const typescript = tseslint.config({ files: GLOB_TS, plugins: { ["@stylistic"]: stylistic, - ["simple-import-sort"]: pluginSimpleImportSort, ["unicorn"]: pluginUnicorn, }, rules: { @@ -109,18 +107,31 @@ export const typescript = tseslint.config({ "@stylistic/no-multi-spaces": ["warn"], "@stylistic/operator-linebreak": ["warn", "before"], "@stylistic/quote-props": ["error", "as-needed"], - "simple-import-sort/exports": "warn", - "simple-import-sort/imports": "warn", - "perfectionist/sort-exports": "off", - "perfectionist/sort-imports": "off", + "perfectionist/sort-exports": ["warn", { type: "natural", order: "asc" }], + "perfectionist/sort-imports": ["warn", { + type: "natural", + groups: [ + "type", + ["parent-type", "sibling-type", "index-type", "internal-type"], + "builtin", + "external", + "internal", + ["parent", "sibling", "index"], + "side-effect", + "object", + "unknown", + ], + newlinesBetween: "ignore", + order: "asc", + }], "perfectionist/sort-interfaces": [ "warn", { ...p11tOptions, ...p11tGroups }, ], "perfectionist/sort-intersection-types": "off", "perfectionist/sort-modules": "off", - "perfectionist/sort-named-exports": "off", - "perfectionist/sort-named-imports": "off", + "perfectionist/sort-named-exports": ["warn", { type: "natural", order: "asc" }], + "perfectionist/sort-named-imports": ["warn", { type: "natural", order: "asc" }], "perfectionist/sort-object-types": [ "warn", { ...p11tOptions, ...p11tGroups }, diff --git a/.pkgs/configs/eslint.ts b/.pkgs/configs/eslint.ts index b4f02c256c..4685c2b625 100644 --- a/.pkgs/configs/eslint.ts +++ b/.pkgs/configs/eslint.ts @@ -4,7 +4,6 @@ import pluginDeMorgan from "eslint-plugin-de-morgan"; import pluginJsdoc from "eslint-plugin-jsdoc"; import pluginPerfectionist from "eslint-plugin-perfectionist"; import pluginRegexp from "eslint-plugin-regexp"; -import pluginSimpleImportSort from "eslint-plugin-simple-import-sort"; import pluginUnicorn from "eslint-plugin-unicorn"; import tseslint from "typescript-eslint"; @@ -113,7 +112,6 @@ export const typescript: ConfigArray = tseslint.config( files: GLOB_TS, plugins: { ["@stylistic"]: stylistic, - ["simple-import-sort"]: pluginSimpleImportSort, ["unicorn"]: pluginUnicorn, }, rules: { @@ -122,19 +120,31 @@ export const typescript: ConfigArray = tseslint.config( "@stylistic/operator-linebreak": ["warn", "before"], "@stylistic/quote-props": ["error", "as-needed"], - "simple-import-sort/exports": "warn", - "simple-import-sort/imports": "warn", - - "perfectionist/sort-exports": "off", - "perfectionist/sort-imports": "off", + "perfectionist/sort-exports": ["warn", { type: "natural", order: "asc" }], + "perfectionist/sort-imports": ["warn", { + type: "natural", + groups: [ + "type", + ["parent-type", "sibling-type", "index-type", "internal-type"], + "builtin", + "external", + "internal", + ["parent", "sibling", "index"], + "side-effect", + "object", + "unknown", + ], + newlinesBetween: "ignore", + order: "asc", + }], "perfectionist/sort-interfaces": [ "warn", { ...p11tOptions, ...p11tGroups }, ], "perfectionist/sort-intersection-types": "off", "perfectionist/sort-modules": "off", - "perfectionist/sort-named-exports": "off", - "perfectionist/sort-named-imports": "off", + "perfectionist/sort-named-exports": ["warn", { type: "natural", order: "asc" }], + "perfectionist/sort-named-imports": ["warn", { type: "natural", order: "asc" }], "perfectionist/sort-object-types": [ "warn", { ...p11tOptions, ...p11tGroups }, diff --git a/.pkgs/configs/package.json b/.pkgs/configs/package.json index a2f4921efb..17523242fe 100644 --- a/.pkgs/configs/package.json +++ b/.pkgs/configs/package.json @@ -25,7 +25,6 @@ "eslint-plugin-jsdoc": "^50.6.8", "eslint-plugin-perfectionist": "^4.10.1", "eslint-plugin-regexp": "^2.7.0", - "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unicorn": "^57.0.0", "typescript-eslint": "^8.27.0" } diff --git a/.pkgs/eslint-plugin-local/package.json b/.pkgs/eslint-plugin-local/package.json index 4d320ca175..bb33e69f7d 100644 --- a/.pkgs/eslint-plugin-local/package.json +++ b/.pkgs/eslint-plugin-local/package.json @@ -36,7 +36,6 @@ "eslint-plugin-jsdoc": "^50.6.8", "eslint-plugin-perfectionist": "^4.10.1", "eslint-plugin-regexp": "^2.7.0", - "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unicorn": "^57.0.0", "string-ts": "^2.2.1", "ts-pattern": "^5.6.2" diff --git a/.pkgs/eslint-plugin-local/src/rules/avoid-multiline-template-expression.ts b/.pkgs/eslint-plugin-local/src/rules/avoid-multiline-template-expression.ts index f667ed96d4..06a41dd912 100644 --- a/.pkgs/eslint-plugin-local/src/rules/avoid-multiline-template-expression.ts +++ b/.pkgs/eslint-plugin-local/src/rules/avoid-multiline-template-expression.ts @@ -1,7 +1,7 @@ -import * as AST from "@eslint-react/ast"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; import { createRule } from "../utils"; diff --git a/.pkgs/eslint-plugin-local/src/utils/is-initialized-from-source.ts b/.pkgs/eslint-plugin-local/src/utils/is-initialized-from-source.ts index 50f85225f5..e2b6273b9e 100644 --- a/.pkgs/eslint-plugin-local/src/utils/is-initialized-from-source.ts +++ b/.pkgs/eslint-plugin-local/src/utils/is-initialized-from-source.ts @@ -1,8 +1,8 @@ +import type { Scope } from "@typescript-eslint/scope-manager"; +import type { TSESTree } from "@typescript-eslint/types"; import * as AST from "@eslint-react/ast"; import { _ } from "@eslint-react/eff"; import { findVariable } from "@eslint-react/var"; -import type { Scope } from "@typescript-eslint/scope-manager"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; /** diff --git a/apps/website/app/(home)/layout.tsx b/apps/website/app/(home)/layout.tsx index c128301255..85c79a4bab 100644 --- a/apps/website/app/(home)/layout.tsx +++ b/apps/website/app/(home)/layout.tsx @@ -1,8 +1,8 @@ -import { HomeLayout } from "fumadocs-ui/layouts/home"; import type { ReactNode } from "react"; - import { baseOptions } from "#/app/layout.config"; +import { HomeLayout } from "fumadocs-ui/layouts/home"; + export default function Layout({ children }: { children: ReactNode }) { return {children}; } diff --git a/apps/website/app/(home)/page.tsx b/apps/website/app/(home)/page.tsx index 1add4f13cf..d75d75cf6f 100644 --- a/apps/website/app/(home)/page.tsx +++ b/apps/website/app/(home)/page.tsx @@ -1,7 +1,7 @@ +import { ESLintReact } from "#/components/eslint-react"; import { Card, Cards } from "fumadocs-ui/components/card"; -import { Link } from "next-view-transitions"; -import { ESLintReact } from "#/components/eslint-react"; +import { Link } from "next-view-transitions"; const features = [ ["Modern", "First-class support for TypeScript, React 19, and more."], diff --git a/apps/website/app/api/search/route.ts b/apps/website/app/api/search/route.ts index 47357ccfff..86f701ca4a 100644 --- a/apps/website/app/api/search/route.ts +++ b/apps/website/app/api/search/route.ts @@ -1,5 +1,5 @@ -import { createFromSource } from "fumadocs-core/search/server"; - import { source } from "#/lib/source"; +import { createFromSource } from "fumadocs-core/search/server"; + export const { GET } = createFromSource(source); diff --git a/apps/website/app/docs/[[...slug]]/page.tsx b/apps/website/app/docs/[[...slug]]/page.tsx index d85264348c..d635942efb 100644 --- a/apps/website/app/docs/[[...slug]]/page.tsx +++ b/apps/website/app/docs/[[...slug]]/page.tsx @@ -1,10 +1,10 @@ +import { source } from "#/lib/source"; import { Popup, PopupContent, PopupTrigger } from "fumadocs-twoslash/ui"; import { Tab, Tabs } from "fumadocs-ui/components/tabs"; import defaultMdxComponents from "fumadocs-ui/mdx"; import { DocsBody, DocsDescription, DocsPage, DocsTitle } from "fumadocs-ui/page"; -import { notFound } from "next/navigation"; -import { source } from "#/lib/source"; +import { notFound } from "next/navigation"; const mdxComponents = { ...defaultMdxComponents, @@ -20,14 +20,19 @@ export default async function Page(props: { }) { const params = await props.params; const page = source.getPage(params.slug); - if (!page) notFound(); - - const MDX = page.data.body; + if (page == null) notFound(); + const { + description, + title, + body: MDX, + full = false, + toc, + } = page.data; return ( - - {page.data.title} - {page.data.description} + + {title} + {description} @@ -44,10 +49,11 @@ export async function generateMetadata(props: { }) { const params = await props.params; const page = source.getPage(params.slug); - if (!page) notFound(); + if (page == null) notFound(); + const { description, title } = page.data; return { - description: page.data.description, - title: page.data.title, + description, + title, }; } diff --git a/apps/website/app/docs/layout.tsx b/apps/website/app/docs/layout.tsx index 737396711c..48f79ab4d3 100644 --- a/apps/website/app/docs/layout.tsx +++ b/apps/website/app/docs/layout.tsx @@ -1,8 +1,8 @@ -import { DocsLayout } from "fumadocs-ui/layouts/docs"; import type { ReactNode } from "react"; - import { baseOptions } from "#/app/layout.config"; + import { source } from "#/lib/source"; +import { DocsLayout } from "fumadocs-ui/layouts/docs"; export default function Layout({ children }: { children: ReactNode }) { return ( diff --git a/apps/website/app/layout.config.tsx b/apps/website/app/layout.config.tsx index 032da9bd14..62ea069f4f 100644 --- a/apps/website/app/layout.config.tsx +++ b/apps/website/app/layout.config.tsx @@ -1,9 +1,9 @@ import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared"; import type { StaticImageData } from "next/image"; -import React from "react"; - import logo from "#/assets/logo.svg"; + import { Image } from "#/components/ui/image"; +import React from "react"; /** * Shared layout configurations diff --git a/apps/website/app/layout.tsx b/apps/website/app/layout.tsx index 55e30f8c9a..f9cfeb7ffd 100644 --- a/apps/website/app/layout.tsx +++ b/apps/website/app/layout.tsx @@ -1,13 +1,13 @@ -import "./base.css"; -import "./overrides.css"; - -import { RootProvider } from "fumadocs-ui/provider"; import type { Metadata } from "next"; -import { IBM_Plex_Mono } from "next/font/google"; -import { ViewTransitions } from "next-view-transitions"; import type { ReactNode } from "react"; +import { RootProvider } from "fumadocs-ui/provider"; +import { ViewTransitions } from "next-view-transitions"; +import { IBM_Plex_Mono } from "next/font/google"; import { baseUrl } from "../lib/metadata"; +import "./base.css"; + +import "./overrides.css"; const ibm_plex_mono = IBM_Plex_Mono({ subsets: ["latin"], diff --git a/apps/website/components/eslint-react.tsx b/apps/website/components/eslint-react.tsx index 715bf0fa03..1c0d6267ca 100644 --- a/apps/website/components/eslint-react.tsx +++ b/apps/website/components/eslint-react.tsx @@ -1,8 +1,8 @@ import type { StaticImageData } from "next/image"; -import React from "react"; - import logo from "#/assets/logo.svg"; +import React from "react"; + import { Image } from "./ui/image"; export function ESLintReact() { diff --git a/apps/website/content/docs/configurations.tsx b/apps/website/content/docs/configurations.tsx index 22efcbc124..bf91686c1c 100644 --- a/apps/website/content/docs/configurations.tsx +++ b/apps/website/content/docs/configurations.tsx @@ -1,9 +1,9 @@ /* eslint-disable perfectionist/sort-objects */ +import { CodeBlock } from "#/components/code-block"; import dedent from "dedent"; import { TypeTable } from "fumadocs-ui/components/type-table"; -import { Link } from "next-view-transitions"; -import { CodeBlock } from "#/components/code-block"; +import { Link } from "next-view-transitions"; export function SettingsTypeTable() { return ( diff --git a/apps/website/eslint.config.ts b/apps/website/eslint.config.ts index 75841c0c76..5cce7fad82 100644 --- a/apps/website/eslint.config.ts +++ b/apps/website/eslint.config.ts @@ -1,16 +1,12 @@ -import js from "@eslint/js"; -import markdown from "@eslint/markdown"; import react from "@eslint-react/eslint-plugin"; +import markdown from "@eslint/markdown"; +import * as configs from "@local/configs/eslint"; // @ts-expect-error - no types for this package import pluginNext from "@next/eslint-plugin-next"; import gitignore from "eslint-config-flat-gitignore"; -import pluginDeMorgan from "eslint-plugin-de-morgan"; import pluginMdx from "eslint-plugin-mdx"; -import pluginPerfectionist from "eslint-plugin-perfectionist"; import pluginReactHooks from "eslint-plugin-react-hooks"; import pluginReactRefresh from "eslint-plugin-react-refresh"; -import pluginSimpleImportSort from "eslint-plugin-simple-import-sort"; -import pluginUnicorn from "eslint-plugin-unicorn"; import tseslint from "typescript-eslint"; import TSCONFIG from "./tsconfig.json" with { type: "json" }; @@ -22,35 +18,6 @@ const GLOB_MDX = ["**/*.mdx"]; const GLOB_APP = ["app/**/*.{js,ts,jsx,tsx}"]; const GLOB_CONFIG = ["**/*.config.{js,mjs,ts,tsx}"]; -const templateIndentAnnotations = [ - "outdent", - "dedent", - "html", - "tsx", - "ts", -]; - -const p11tOptions = { - type: "natural", - ignoreCase: false, -}; - -const p11tGroups = { - customGroups: { - id: ["^_$", "^id$", "^key$", "^self$"], - type: ["^type$", "^kind$"], - meta: [ - "^name$", - "^meta$", - "^title$", - "^description$", - ], - alias: ["^alias$", "^as$"], - rules: ["^node$", "^messageId$"], - }, - groups: ["id", "type", "meta", "alias", "rules", "unknown"], -}; - export default tseslint.config( { extends: [ @@ -72,61 +39,17 @@ export default tseslint.config( }, { extends: [ - js.configs.recommended, - tseslint.configs.recommended, - pluginDeMorgan.configs.recommended, - pluginPerfectionist.configs["recommended-natural"], + configs.typescript, ], files: GLOB_TS, - plugins: { - "simple-import-sort": pluginSimpleImportSort, - unicorn: pluginUnicorn, - }, rules: { - "perfectionist/sort-exports": "off", - "perfectionist/sort-imports": "off", - "perfectionist/sort-interfaces": [ - "warn", - { - ...p11tOptions, - ...p11tGroups, - }, - ], - "perfectionist/sort-intersection-types": "off", - "perfectionist/sort-modules": "off", - "perfectionist/sort-named-exports": "off", - "perfectionist/sort-named-imports": "off", - "perfectionist/sort-object-types": [ - "warn", - { - ...p11tOptions, - ...p11tGroups, - }, - ], - "perfectionist/sort-objects": [ - "warn", - { - ...p11tOptions, - ...p11tGroups, - partitionByComment: "^Part:.*", - }, - ], - "perfectionist/sort-switch-case": "off", - "perfectionist/sort-union-types": "off", - "simple-import-sort/exports": "warn", - "simple-import-sort/imports": "warn", - "unicorn/template-indent": [ - "warn", - { - comments: templateIndentAnnotations, - tags: templateIndentAnnotations, - }, - ], + "no-restricted-syntax": "off", }, }, { extends: [ tseslint.configs.recommendedTypeChecked, + react.configs["recommended-type-checked"], ], files: TSCONFIG.include, languageOptions: { @@ -137,35 +60,16 @@ export default tseslint.config( tsconfigRootDir: import.meta.dirname, }, }, - }, - { - files: TSCONFIG.include, - ...react.configs["recommended-type-checked"], - }, - { - files: TSCONFIG.include, plugins: { + "@next/next": pluginNext, "react-hooks": pluginReactHooks, - }, - rules: pluginReactHooks.configs.recommended.rules, - }, - { - files: TSCONFIG.include, - plugins: { "react-refresh": pluginReactRefresh, }, - rules: { - "react-refresh/only-export-components": "warn", - }, - }, - { - files: TSCONFIG.include, - plugins: { - "@next/next": pluginNext, - }, rules: { ...pluginNext.configs.recommended.rules, ...pluginNext.configs["core-web-vitals"].rules, + ...pluginReactHooks.configs.recommended.rules, + "react-refresh/only-export-components": "warn", }, }, { diff --git a/apps/website/lib/metadata.ts b/apps/website/lib/metadata.ts index b3d1d5d9d5..8d39dbf23a 100644 --- a/apps/website/lib/metadata.ts +++ b/apps/website/lib/metadata.ts @@ -1,3 +1,3 @@ -export const baseUrl = process.env.NODE_ENV === "development" || !process.env["VERCEL_URL"] +export const baseUrl = process.env.NODE_ENV === "development" || process.env["VERCEL_URL"] == null ? new URL("http://localhost:3000") : new URL(`https://${process.env["VERCEL_URL"]}`); diff --git a/apps/website/lib/source.ts b/apps/website/lib/source.ts index 7857627920..d09b132cd2 100644 --- a/apps/website/lib/source.ts +++ b/apps/website/lib/source.ts @@ -1,7 +1,7 @@ -import { loader } from "fumadocs-core/source"; - import { docs } from "#/.source"; +import { loader } from "fumadocs-core/source"; + export const source = loader({ baseUrl: "/docs", source: docs.toFumadocsSource(), diff --git a/apps/website/package.json b/apps/website/package.json index 9b279e0dcf..4133a031a7 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -54,7 +54,6 @@ "eslint-plugin-perfectionist": "^4.10.1", "eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-refresh": "^0.4.19", - "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unicorn": "^57.0.0", "postcss": "^8.5.3", "tailwindcss": "^4.0.15", diff --git a/eslint.config.ts b/eslint.config.ts index d2ea033c67..b14fcd2d7e 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -3,9 +3,9 @@ import url from "node:url"; import markdown from "@eslint/markdown"; import * as configs from "@local/configs/eslint"; import pluginLocal from "@local/eslint-plugin-local"; -import { globalIgnores } from "eslint/config"; import configFlatGitignore from "eslint-config-flat-gitignore"; import pluginVitest from "eslint-plugin-vitest"; +import { globalIgnores } from "eslint/config"; import tseslint from "typescript-eslint"; const dirname = url.fileURLToPath(new URL(".", import.meta.url)); diff --git a/packages/core/src/component/component-collector-legacy.ts b/packages/core/src/component/component-collector-legacy.ts index 8eff81022e..349e10d375 100644 --- a/packages/core/src/component/component-collector-legacy.ts +++ b/packages/core/src/component/component-collector-legacy.ts @@ -1,10 +1,10 @@ +import type { ESLintUtils, TSESTree } from "@typescript-eslint/utils"; +import type { ERClassComponent } from "./component-semantic-node"; import * as AST from "@eslint-react/ast"; import { _ } from "@eslint-react/eff"; -import { getId } from "@eslint-react/shared"; -import type { ESLintUtils, TSESTree } from "@typescript-eslint/utils"; +import { getId } from "@eslint-react/shared"; import { ERComponentFlag } from "./component-flag"; -import type { ERClassComponent } from "./component-semantic-node"; import { isClassComponent, isPureComponent } from "./is"; export declare namespace useComponentCollectorLegacy { diff --git a/packages/core/src/component/component-collector.ts b/packages/core/src/component/component-collector.ts index 7930b8e2cf..b883ae8316 100644 --- a/packages/core/src/component/component-collector.ts +++ b/packages/core/src/component/component-collector.ts @@ -1,21 +1,21 @@ /* eslint-disable no-restricted-syntax */ +import type { RuleContext } from "@eslint-react/kit"; +import type { TSESTree } from "@typescript-eslint/types"; +import type { ESLintUtils } from "@typescript-eslint/utils"; +import type { ERComponentHint } from "./component-collector-hint"; +import type { ERFunctionComponent } from "./component-semantic-node"; import * as AST from "@eslint-react/ast"; import { _ } from "@eslint-react/eff"; import * as JSX from "@eslint-react/jsx"; -import type { RuleContext } from "@eslint-react/kit"; + import { getId } from "@eslint-react/shared"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { ESLintUtils } from "@typescript-eslint/utils"; - import { DISPLAY_NAME_ASSIGNMENT_SELECTOR } from "../constants"; import { isReactHookCall } from "../hook"; -import type { ERComponentHint } from "./component-collector-hint"; import { DEFAULT_COMPONENT_HINT } from "./component-collector-hint"; import { ERComponentFlag } from "./component-flag"; import { getFunctionComponentIdentifier } from "./component-id"; import { getComponentNameFromIdentifier, hasNoneOrLooseComponentName } from "./component-name"; -import type { ERFunctionComponent } from "./component-semantic-node"; import { hasValidHierarchy } from "./hierarchy"; type FunctionEntry = { diff --git a/packages/core/src/component/component-id.ts b/packages/core/src/component/component-id.ts index 808f57cbf3..2bf915791e 100644 --- a/packages/core/src/component/component-id.ts +++ b/packages/core/src/component/component-id.ts @@ -1,7 +1,7 @@ -import * as AST from "@eslint-react/ast"; -import { _ } from "@eslint-react/eff"; import type { RuleContext } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; +import * as AST from "@eslint-react/ast"; +import { _ } from "@eslint-react/eff"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { isReactHookCallWithNameLoose } from "../hook"; diff --git a/packages/core/src/component/component-lifecycle.ts b/packages/core/src/component/component-lifecycle.ts index 4f5b1099df..ab4be33051 100644 --- a/packages/core/src/component/component-lifecycle.ts +++ b/packages/core/src/component/component-lifecycle.ts @@ -1,5 +1,5 @@ -import * as AST from "@eslint-react/ast"; import type { TSESTree } from "@typescript-eslint/types"; +import * as AST from "@eslint-react/ast"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { isClassComponent } from "./is"; diff --git a/packages/core/src/component/component-name.ts b/packages/core/src/component/component-name.ts index bf6a46c1d0..4bd5b9d3f8 100644 --- a/packages/core/src/component/component-name.ts +++ b/packages/core/src/component/component-name.ts @@ -1,7 +1,7 @@ import type * as AST from "@eslint-react/ast"; -import { _ } from "@eslint-react/eff"; import type { RuleContext } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; +import { _ } from "@eslint-react/eff"; import { getFunctionComponentIdentifier } from "./component-id"; diff --git a/packages/core/src/component/component-render-prop.ts b/packages/core/src/component/component-render-prop.ts index 5ca89a713b..9869cac22f 100644 --- a/packages/core/src/component/component-render-prop.ts +++ b/packages/core/src/component/component-render-prop.ts @@ -1,7 +1,7 @@ -import * as AST from "@eslint-react/ast"; -import * as JSX from "@eslint-react/jsx"; import type { RuleContext } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; +import * as AST from "@eslint-react/ast"; +import * as JSX from "@eslint-react/jsx"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; /** diff --git a/packages/core/src/component/component-state.ts b/packages/core/src/component/component-state.ts index 6da72795e8..d8d52c7063 100644 --- a/packages/core/src/component/component-state.ts +++ b/packages/core/src/component/component-state.ts @@ -1,5 +1,5 @@ -import * as AST from "@eslint-react/ast"; import type { TSESTree } from "@typescript-eslint/types"; +import * as AST from "@eslint-react/ast"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; export type ERStateKind = "actionState" | "state"; diff --git a/packages/core/src/component/hierarchy.ts b/packages/core/src/component/hierarchy.ts index 5a6e00351d..20c1add35e 100644 --- a/packages/core/src/component/hierarchy.ts +++ b/packages/core/src/component/hierarchy.ts @@ -1,7 +1,7 @@ /* eslint-disable jsdoc/require-param */ +import type { TSESTree } from "@typescript-eslint/types"; import * as AST from "@eslint-react/ast"; import { type RuleContext } from "@eslint-react/kit"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { isCreateElementCall } from "../utils"; diff --git a/packages/core/src/effect/is.ts b/packages/core/src/effect/is.ts index 0fb868b348..3076c31a6f 100644 --- a/packages/core/src/effect/is.ts +++ b/packages/core/src/effect/is.ts @@ -1,6 +1,6 @@ +import type { TSESTree } from "@typescript-eslint/types"; import * as AST from "@eslint-react/ast"; import { _ } from "@eslint-react/eff"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { isUseEffectCallLoose } from "../hook"; diff --git a/packages/core/src/hook/hook-collector.ts b/packages/core/src/hook/hook-collector.ts index feb24c3264..3380a2b24f 100644 --- a/packages/core/src/hook/hook-collector.ts +++ b/packages/core/src/hook/hook-collector.ts @@ -1,9 +1,9 @@ -import * as AST from "@eslint-react/ast"; -import { getId } from "@eslint-react/shared"; import type { ESLintUtils, TSESTree } from "@typescript-eslint/utils"; +import type { ERHook } from "./hook-semantic-node"; +import * as AST from "@eslint-react/ast"; +import { getId } from "@eslint-react/shared"; import { isReactHookName } from "./hook-name"; -import type { ERHook } from "./hook-semantic-node"; import { isReactHookCall } from "./is"; type FunctionEntry = { diff --git a/packages/core/src/hook/is.ts b/packages/core/src/hook/is.ts index a633193a5c..f7f5099552 100644 --- a/packages/core/src/hook/is.ts +++ b/packages/core/src/hook/is.ts @@ -1,8 +1,8 @@ +import type { RuleContext } from "@eslint-react/kit"; +import type { TSESTree } from "@typescript-eslint/types"; import * as AST from "@eslint-react/ast"; import { _, constFalse, flip } from "@eslint-react/eff"; -import type { RuleContext } from "@eslint-react/kit"; import { unsafeDecodeSettings } from "@eslint-react/shared"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { DEFAULT_ESLINT_REACT_SETTINGS } from "../../../shared/src/schemas"; diff --git a/packages/core/src/utils/get-instance-id.ts b/packages/core/src/utils/get-instance-id.ts index c48e44d93e..56de0a2b4d 100644 --- a/packages/core/src/utils/get-instance-id.ts +++ b/packages/core/src/utils/get-instance-id.ts @@ -1,6 +1,6 @@ /* eslint-disable jsdoc/require-param */ -import { _ } from "@eslint-react/eff"; import type { TSESTree } from "@typescript-eslint/types"; +import { _ } from "@eslint-react/eff"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; /** @internal */ diff --git a/packages/core/src/utils/is-from-react.ts b/packages/core/src/utils/is-from-react.ts index 9ed9a0a0a1..b39b5bcfac 100644 --- a/packages/core/src/utils/is-from-react.ts +++ b/packages/core/src/utils/is-from-react.ts @@ -1,9 +1,9 @@ /* eslint-disable jsdoc/require-param */ -import { type _, dual } from "@eslint-react/eff"; import type { RuleContext } from "@eslint-react/kit"; -import { DEFAULT_ESLINT_REACT_SETTINGS, unsafeDecodeSettings } from "@eslint-react/shared"; import type { Scope } from "@typescript-eslint/scope-manager"; import type { TSESTree } from "@typescript-eslint/types"; +import { type _, dual } from "@eslint-react/eff"; +import { DEFAULT_ESLINT_REACT_SETTINGS, unsafeDecodeSettings } from "@eslint-react/shared"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { isInitializedFromReact } from "./is-initialized-from-react"; diff --git a/packages/core/src/utils/is-initialized-from-react.ts b/packages/core/src/utils/is-initialized-from-react.ts index 30f7630708..7cab043b18 100644 --- a/packages/core/src/utils/is-initialized-from-react.ts +++ b/packages/core/src/utils/is-initialized-from-react.ts @@ -1,8 +1,8 @@ +import type { Scope } from "@typescript-eslint/scope-manager"; +import type { TSESTree } from "@typescript-eslint/types"; import * as AST from "@eslint-react/ast"; import { _, identity } from "@eslint-react/eff"; import * as VAR from "@eslint-react/var"; -import type { Scope } from "@typescript-eslint/scope-manager"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { match, P } from "ts-pattern"; diff --git a/packages/core/src/utils/is-instance-id-equal.ts b/packages/core/src/utils/is-instance-id-equal.ts index cc57feb647..1dd7056f04 100644 --- a/packages/core/src/utils/is-instance-id-equal.ts +++ b/packages/core/src/utils/is-instance-id-equal.ts @@ -1,8 +1,8 @@ /* eslint-disable jsdoc/require-param */ -import * as AST from "@eslint-react/ast"; import type { RuleContext } from "@eslint-react/kit"; -import * as VAR from "@eslint-react/var"; import type { TSESTree } from "@typescript-eslint/types"; +import * as AST from "@eslint-react/ast"; +import * as VAR from "@eslint-react/var"; /** @internal */ export function isInstanceIdEqual(context: RuleContext, a: TSESTree.Node, b: TSESTree.Node) { diff --git a/packages/plugins/eslint-plugin-react-debug/src/rules/class-component.ts b/packages/plugins/eslint-plugin-react-debug/src/rules/class-component.ts index fafc34966c..35b7f57922 100644 --- a/packages/plugins/eslint-plugin-react-debug/src/rules/class-component.ts +++ b/packages/plugins/eslint-plugin-react-debug/src/rules/class-component.ts @@ -1,7 +1,7 @@ -import { useComponentCollectorLegacy } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { useComponentCollectorLegacy } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-debug/src/rules/function-component.ts b/packages/plugins/eslint-plugin-react-debug/src/rules/function-component.ts index 4b431ea943..a1a810eee1 100644 --- a/packages/plugins/eslint-plugin-react-debug/src/rules/function-component.ts +++ b/packages/plugins/eslint-plugin-react-debug/src/rules/function-component.ts @@ -1,7 +1,7 @@ -import { DEFAULT_COMPONENT_HINT, ERComponentFlag, useComponentCollector } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { DEFAULT_COMPONENT_HINT, ERComponentFlag, useComponentCollector } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-debug/src/rules/hook.ts b/packages/plugins/eslint-plugin-react-debug/src/rules/hook.ts index a3051c8acc..67a4d783c2 100644 --- a/packages/plugins/eslint-plugin-react-debug/src/rules/hook.ts +++ b/packages/plugins/eslint-plugin-react-debug/src/rules/hook.ts @@ -1,7 +1,7 @@ -import { useHookCollector } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { useHookCollector } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-debug/src/rules/is-from-react.ts b/packages/plugins/eslint-plugin-react-debug/src/rules/is-from-react.ts index d5510577d2..c7dc7421e2 100644 --- a/packages/plugins/eslint-plugin-react-debug/src/rules/is-from-react.ts +++ b/packages/plugins/eslint-plugin-react-debug/src/rules/is-from-react.ts @@ -1,11 +1,11 @@ -import { isInitializedFromReact } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getSettingsFromContext } from "@eslint-react/shared"; import type { Scope } from "@typescript-eslint/scope-manager"; import type { TSESTree } from "@typescript-eslint/utils"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { isInitializedFromReact } from "@eslint-react/core"; +import { getSettingsFromContext } from "@eslint-react/shared"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-dangerously-set-innerhtml-with-children.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-dangerously-set-innerhtml-with-children.ts index cd2dfa50ea..df159017b0 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-dangerously-set-innerhtml-with-children.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-dangerously-set-innerhtml-with-children.ts @@ -1,8 +1,8 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-dangerously-set-innerhtml.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-dangerously-set-innerhtml.ts index cc315d40ae..af62039803 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-dangerously-set-innerhtml.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-dangerously-set-innerhtml.ts @@ -1,7 +1,7 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-find-dom-node.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-find-dom-node.ts index cba7e89f8a..9a71073330 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-find-dom-node.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-find-dom-node.ts @@ -1,7 +1,7 @@ import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-flush-sync.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-flush-sync.ts index f661c7301f..d8cfc8a5b8 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-flush-sync.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-flush-sync.ts @@ -1,7 +1,7 @@ import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-hydrate.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-hydrate.ts index cce5a62aae..72747bf2d1 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-hydrate.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-hydrate.ts @@ -1,10 +1,10 @@ import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleFixer, RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import { compare } from "compare-versions"; import type { CamelCase } from "string-ts"; +import { getSettingsFromContext } from "@eslint-react/shared"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; +import { compare } from "compare-versions"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.ts index 6d7a0d0fb6..755b1eef1a 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.ts @@ -1,8 +1,8 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getSettingsFromContext } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; +import { getSettingsFromContext } from "@eslint-react/shared"; import { createRule, findCustomComponent, findCustomComponentProp, getElementTypeOnJsxAndDom } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.ts index a3f0d29811..39d4c3deba 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-iframe-sandbox.ts @@ -1,8 +1,8 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getSettingsFromContext } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; +import { getSettingsFromContext } from "@eslint-react/shared"; import { createRule, findCustomComponent, findCustomComponentProp, getElementTypeOnJsxAndDom } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-namespace.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-namespace.ts index a437b03cc1..c19974cbb6 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-namespace.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-namespace.ts @@ -1,7 +1,7 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-render-return-value.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-render-return-value.ts index ad34443a77..f682d1421f 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-render-return-value.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-render-return-value.ts @@ -1,8 +1,8 @@ -import * as AST from "@eslint-react/ast"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-render.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-render.ts index 7d1ca94689..7659c9be90 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-render.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-render.ts @@ -1,10 +1,10 @@ import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleFixer, RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import { compare } from "compare-versions"; import type { CamelCase } from "string-ts"; +import { getSettingsFromContext } from "@eslint-react/shared"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; +import { compare } from "compare-versions"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-script-url.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-script-url.ts index 3a7c3a26f2..c9ed829885 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-script-url.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-script-url.ts @@ -1,9 +1,9 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { RE_JAVASCRIPT_PROTOCOL } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; +import { RE_JAVASCRIPT_PROTOCOL } from "@eslint-react/kit"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-unsafe-iframe-sandbox.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-unsafe-iframe-sandbox.ts index 175b1ca176..5699f52748 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-unsafe-iframe-sandbox.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-unsafe-iframe-sandbox.ts @@ -1,8 +1,8 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getSettingsFromContext } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; +import { getSettingsFromContext } from "@eslint-react/shared"; import { createRule, findCustomComponent, findCustomComponentProp, getElementTypeOnJsxAndDom } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-unsafe-target-blank.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-unsafe-target-blank.ts index 7a885a8e95..92094e75be 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-unsafe-target-blank.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-unsafe-target-blank.ts @@ -1,10 +1,10 @@ -import { _ } from "@eslint-react/eff"; -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { _ } from "@eslint-react/eff"; +import * as JSX from "@eslint-react/jsx"; +import { getSettingsFromContext } from "@eslint-react/shared"; import { createRule, findCustomComponent, findCustomComponentProp, getElementTypeOnJsxAndDom } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-use-form-state.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-use-form-state.ts index f98c903232..d8e547385a 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-use-form-state.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-use-form-state.ts @@ -1,10 +1,10 @@ import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleFixer, RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import { compare } from "compare-versions"; import type { CamelCase } from "string-ts"; +import { getSettingsFromContext } from "@eslint-react/shared"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; +import { compare } from "compare-versions"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-void-elements-with-children.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-void-elements-with-children.ts index 416ea7b67a..1125893ae2 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-void-elements-with-children.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-void-elements-with-children.ts @@ -1,7 +1,7 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/utils/get-element-type-on-jsx-and-dom.ts b/packages/plugins/eslint-plugin-react-dom/src/utils/get-element-type-on-jsx-and-dom.ts index 2a80f441e9..463d48b454 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/utils/get-element-type-on-jsx-and-dom.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/utils/get-element-type-on-jsx-and-dom.ts @@ -1,7 +1,7 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext } from "@eslint-react/kit"; import type { CustomComponentNormalized } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; +import * as JSX from "@eslint-react/jsx"; export function getElementTypeOnJsxAndDom( context: RuleContext, diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/hooks/use-no-direct-set-state-in-use-effect.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/hooks/use-no-direct-set-state-in-use-effect.ts index 611f0aabeb..f78313eee1 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/hooks/use-no-direct-set-state-in-use-effect.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/hooks/use-no-direct-set-state-in-use-effect.ts @@ -1,12 +1,12 @@ +import type { RuleContext } from "@eslint-react/kit"; +import type { ESLintUtils, TSESTree } from "@typescript-eslint/utils"; +import type { Scope } from "@typescript-eslint/utils/ts-eslint"; import * as AST from "@eslint-react/ast"; import { isReactHookCallWithNameAlias } from "@eslint-react/core"; import { _, getOrUpdate } from "@eslint-react/eff"; -import type { RuleContext } from "@eslint-react/kit"; import { getSettingsFromContext } from "@eslint-react/shared"; import * as VAR from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { ESLintUtils, TSESTree } from "@typescript-eslint/utils"; -import type { Scope } from "@typescript-eslint/utils/ts-eslint"; import { match } from "ts-pattern"; import { diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-callback.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-callback.ts index 266eeff9ec..141207920e 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-callback.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-callback.ts @@ -1,12 +1,12 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; import * as AST from "@eslint-react/ast"; import { isReactHookCall, isReactHookCallWithNameLoose, isUseCallbackCall } from "@eslint-react/core"; import { _, identity } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import { getSettingsFromContext } from "@eslint-react/shared"; import * as VAR from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import type { CamelCase } from "string-ts"; import { match } from "ts-pattern"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-memo.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-memo.ts index 3e413bd0ec..a24fca9172 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-memo.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-memo.ts @@ -1,12 +1,12 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; import * as AST from "@eslint-react/ast"; import { isReactHookCall, isReactHookCallWithNameLoose, isUseMemoCall } from "@eslint-react/core"; import { _, identity } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import { getSettingsFromContext } from "@eslint-react/shared"; import * as VAR from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import type { CamelCase } from "string-ts"; import { match } from "ts-pattern"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-prefix.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-prefix.ts index ec2968d088..a89c172375 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-prefix.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-unnecessary-use-prefix.ts @@ -1,9 +1,9 @@ -import * as AST from "@eslint-react/ast"; -import { useHookCollector } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { useHookCollector } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/prefer-use-state-lazy-initialization.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/prefer-use-state-lazy-initialization.ts index be114fdb5f..045113b914 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/prefer-use-state-lazy-initialization.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/prefer-use-state-lazy-initialization.ts @@ -1,3 +1,6 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; // Ported from https://github.com/jsx-eslint/eslint-plugin-react/pull/3579/commits/ebb739a0fe99a2ee77055870bfda9f67a2691374 import * as AST from "@eslint-react/ast"; import { @@ -7,10 +10,7 @@ import { isUseCall, isUseStateCall, } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import { getSettingsFromContext } from "@eslint-react/shared"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import type { CamelCase } from "string-ts"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-from-hook-call.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-from-hook-call.ts index 518bdf2189..cadbc1b16d 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-from-hook-call.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-from-hook-call.ts @@ -1,9 +1,9 @@ -import { isReactHookCallWithNameAlias } from "@eslint-react/core"; -import { constTrue } from "@eslint-react/eff"; import type { REACT_BUILD_IN_HOOKS, RuleContext } from "@eslint-react/kit"; import type { ESLintReactSettingsNormalized } from "@eslint-react/shared"; -import * as VAR from "@eslint-react/var"; import type { TSESTree } from "@typescript-eslint/types"; +import { isReactHookCallWithNameAlias } from "@eslint-react/core"; +import { constTrue } from "@eslint-react/eff"; +import * as VAR from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; export function isFromHookCall( diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-set-function-call.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-set-function-call.ts index bd8126c094..01c00b963a 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-set-function-call.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-set-function-call.ts @@ -1,7 +1,7 @@ import type { RuleContext } from "@eslint-react/kit"; import type { ESLintReactSettingsNormalized } from "@eslint-react/shared"; -import * as VAR from "@eslint-react/var"; import type { TSESTree } from "@typescript-eslint/types"; +import * as VAR from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { isFromUseStateCall } from "./is-from-use-state-call"; diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-variable-declarator-from-hook-call.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-variable-declarator-from-hook-call.ts index e109a215b0..36d5cad54a 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-variable-declarator-from-hook-call.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-variable-declarator-from-hook-call.ts @@ -1,5 +1,5 @@ -import { isReactHookName } from "@eslint-react/core"; import type { TSESTree } from "@typescript-eslint/types"; +import { isReactHookName } from "@eslint-react/core"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; export function isVariableDeclaratorFromHookCall(node: TSESTree.Node): node is diff --git a/packages/plugins/eslint-plugin-react-naming-convention/src/rules/component-name.ts b/packages/plugins/eslint-plugin-react-naming-convention/src/rules/component-name.ts index 2b5913b455..1ca799f3df 100644 --- a/packages/plugins/eslint-plugin-react-naming-convention/src/rules/component-name.ts +++ b/packages/plugins/eslint-plugin-react-naming-convention/src/rules/component-name.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { useComponentCollector, useComponentCollectorLegacy } from "@eslint-react/core"; import type { _ } from "@eslint-react/eff"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { RE_CONSTANT_CASE, RE_PASCAL_CASE } from "@eslint-react/kit"; import type { JSONSchema4 } from "@typescript-eslint/utils/json-schema"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import * as AST from "@eslint-react/ast"; +import { useComponentCollector, useComponentCollectorLegacy } from "@eslint-react/core"; +import { RE_CONSTANT_CASE, RE_PASCAL_CASE } from "@eslint-react/kit"; import { createRule, toRegExp } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-naming-convention/src/rules/context-name.ts b/packages/plugins/eslint-plugin-react-naming-convention/src/rules/context-name.ts index cff73efb0c..717b6d1384 100644 --- a/packages/plugins/eslint-plugin-react-naming-convention/src/rules/context-name.ts +++ b/packages/plugins/eslint-plugin-react-naming-convention/src/rules/context-name.ts @@ -1,8 +1,8 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { getInstanceId, isComponentName, isCreateContextCall } from "@eslint-react/core"; import { _, identity } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { match, P } from "ts-pattern"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename-extension.ts b/packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename-extension.ts index 1b25b6c563..b43ba68ec4 100644 --- a/packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename-extension.ts +++ b/packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename-extension.ts @@ -1,8 +1,8 @@ import type { _ } from "@eslint-react/eff"; -import { isObject } from "@eslint-react/eff"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { JSONSchema4 } from "@typescript-eslint/utils/json-schema"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import { isObject } from "@eslint-react/eff"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename.ts b/packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename.ts index d6a6b1a571..78f18c564d 100644 --- a/packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename.ts +++ b/packages/plugins/eslint-plugin-react-naming-convention/src/rules/filename.ts @@ -1,10 +1,10 @@ -import path from "node:path"; - import type { _ } from "@eslint-react/eff"; + import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { RE_CAMEL_CASE, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE } from "@eslint-react/kit"; import type { JSONSchema4 } from "@typescript-eslint/utils/json-schema"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import path from "node:path"; +import { RE_CAMEL_CASE, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE } from "@eslint-react/kit"; import { camelCase, kebabCase, pascalCase, snakeCase } from "string-ts"; import { match } from "ts-pattern"; diff --git a/packages/plugins/eslint-plugin-react-naming-convention/src/rules/use-state.ts b/packages/plugins/eslint-plugin-react-naming-convention/src/rules/use-state.ts index 55919d9a17..ea4a243270 100644 --- a/packages/plugins/eslint-plugin-react-naming-convention/src/rules/use-state.ts +++ b/packages/plugins/eslint-plugin-react-naming-convention/src/rules/use-state.ts @@ -1,9 +1,9 @@ -import { getInstanceId } from "@eslint-react/core"; -import { _ } from "@eslint-react/eff"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import { getInstanceId } from "@eslint-react/core"; +import { _ } from "@eslint-react/eff"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { snakeCase } from "string-ts"; import { match } from "ts-pattern"; diff --git a/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-event-listener.ts b/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-event-listener.ts index 1379cba15e..c4fbab9454 100644 --- a/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-event-listener.ts +++ b/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-event-listener.ts @@ -1,16 +1,16 @@ -import * as AST from "@eslint-react/ast"; import type { ERPhaseKind } from "@eslint-react/core"; -import { ERPhaseRelevance, isInversePhase } from "@eslint-react/core"; -import { _ } from "@eslint-react/eff"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import * as VAR from "@eslint-react/var"; import type { Scope } from "@typescript-eslint/scope-manager"; import type { TSESTree } from "@typescript-eslint/utils"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import { isMatching, match, P } from "ts-pattern"; - import type { EventListenerEntry } from "../types"; +import * as AST from "@eslint-react/ast"; +import { ERPhaseRelevance, isInversePhase } from "@eslint-react/core"; +import { _ } from "@eslint-react/eff"; +import * as VAR from "@eslint-react/var"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; + +import { isMatching, match, P } from "ts-pattern"; import { createRule, getPhaseKindOfFunction } from "../utils"; // #region Rule Metadata diff --git a/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-interval.ts b/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-interval.ts index dd4cea7f1d..c56bae48d0 100644 --- a/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-interval.ts +++ b/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-interval.ts @@ -1,14 +1,14 @@ import type * as AST from "@eslint-react/ast"; import type { ERPhaseKind } from "@eslint-react/core"; -import { ERPhaseRelevance, isInstanceIdEqual } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import * as VAR from "@eslint-react/var"; import type { TSESTree } from "@typescript-eslint/utils"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import { isMatching, P } from "ts-pattern"; - import type { TimerEntry } from "../types"; +import { ERPhaseRelevance, isInstanceIdEqual } from "@eslint-react/core"; +import * as VAR from "@eslint-react/var"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; + +import { isMatching, P } from "ts-pattern"; import { createRule, getPhaseKindOfFunction } from "../utils"; // #region Rule Metadata diff --git a/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-resize-observer.ts b/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-resize-observer.ts index 6e6660e56b..a3dcc7cf35 100644 --- a/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-resize-observer.ts +++ b/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-resize-observer.ts @@ -1,15 +1,15 @@ -import * as AST from "@eslint-react/ast"; import type { ERPhaseKind } from "@eslint-react/core"; +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { TSESTree } from "@typescript-eslint/utils"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { ObserverEntry, ObserverMethod } from "../types"; +import * as AST from "@eslint-react/ast"; import { ERPhaseRelevance, getInstanceId, isInstanceIdEqual } from "@eslint-react/core"; import { _, or } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import * as VAR from "@eslint-react/var"; -import type { TSESTree } from "@typescript-eslint/utils"; import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import { isMatching, match, P } from "ts-pattern"; -import type { ObserverEntry, ObserverMethod } from "../types"; +import { isMatching, match, P } from "ts-pattern"; import { createRule, getPhaseKindOfFunction } from "../utils"; // #region Rule Metadata diff --git a/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-timeout.ts b/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-timeout.ts index dac46bb7f5..7a772a42a2 100644 --- a/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-timeout.ts +++ b/packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-timeout.ts @@ -1,14 +1,14 @@ import type * as AST from "@eslint-react/ast"; import type { ERPhaseKind } from "@eslint-react/core"; -import { ERPhaseRelevance, isInstanceIdEqual } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import * as VAR from "@eslint-react/var"; import type { TSESTree } from "@typescript-eslint/utils"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import { isMatching, P } from "ts-pattern"; - import type { TimerEntry } from "../types"; +import { ERPhaseRelevance, isInstanceIdEqual } from "@eslint-react/core"; +import * as VAR from "@eslint-react/var"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; + +import { isMatching, P } from "ts-pattern"; import { createRule, getPhaseKindOfFunction } from "../utils"; // #region Rule Metadata diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/avoid-shorthand-boolean.ts b/packages/plugins/eslint-plugin-react-x/src/rules/avoid-shorthand-boolean.ts index bb2ae54ab0..818231322c 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/avoid-shorthand-boolean.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/avoid-shorthand-boolean.ts @@ -1,7 +1,7 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleFeature } from "@eslint-react/kit"; import type { RuleContext, RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-access-state-in-setstate.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-access-state-in-setstate.ts index d7822407fd..a6b7d29f60 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-access-state-in-setstate.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-access-state-in-setstate.ts @@ -1,11 +1,11 @@ -import * as AST from "@eslint-react/ast"; -import { isClassComponent, isThisSetState } from "@eslint-react/core"; -import { constFalse, constTrue } from "@eslint-react/eff"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { isClassComponent, isThisSetState } from "@eslint-react/core"; +import { constFalse, constTrue } from "@eslint-react/eff"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { match } from "ts-pattern"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-array-index-key.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-array-index-key.ts index 78cb69f2db..b927c7a0f1 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-array-index-key.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-array-index-key.ts @@ -1,12 +1,12 @@ +import type { TSESTree } from "@typescript-eslint/utils"; +import type { ReportDescriptor, RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; import * as AST from "@eslint-react/ast"; import { isCloneElementCall, isCreateElementCall, isInitializedFromReact } from "@eslint-react/core"; import { _ } from "@eslint-react/eff"; import { createReport, type RuleContext, type RuleFeature } from "@eslint-react/kit"; import { unsafeDecodeSettings } from "@eslint-react/shared"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { TSESTree } from "@typescript-eslint/utils"; -import type { ReportDescriptor, RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import type { CamelCase } from "string-ts"; import { isMatching } from "ts-pattern"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-count.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-count.ts index 333da36c69..377f077a23 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-count.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-count.ts @@ -1,7 +1,7 @@ -import { isChildrenCount } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { isChildrenCount } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-for-each.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-for-each.ts index 14fecdc6d6..90890fff66 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-for-each.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-for-each.ts @@ -1,7 +1,7 @@ -import { isChildrenForEach } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { isChildrenForEach } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-map.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-map.ts index 22937ba82f..2f20eabe59 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-map.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-map.ts @@ -1,7 +1,7 @@ -import { isChildrenMap } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { isChildrenMap } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-only.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-only.ts index 8edb83a804..4da6b4c54a 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-only.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-only.ts @@ -1,7 +1,7 @@ -import { isChildrenOnly } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { isChildrenOnly } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-prop.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-prop.ts index 711d82f26b..a02d3cc4de 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-prop.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-prop.ts @@ -1,7 +1,7 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-to-array.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-to-array.ts index 4114fd8435..d5d9ccd128 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-children-to-array.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-children-to-array.ts @@ -1,7 +1,7 @@ -import { isChildrenToArray } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { isChildrenToArray } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-class-component.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-class-component.ts index 6ed2f546e8..10e9001376 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-class-component.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-class-component.ts @@ -1,7 +1,7 @@ -import { isComponentDidCatch, isGetDerivedStateFromError, useComponentCollectorLegacy } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { isComponentDidCatch, isGetDerivedStateFromError, useComponentCollectorLegacy } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-clone-element.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-clone-element.ts index 18a2cb1737..b1fcf95b77 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-clone-element.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-clone-element.ts @@ -1,7 +1,7 @@ -import { isCloneElementCall } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { isCloneElementCall } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-comment-textnodes.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-comment-textnodes.ts index 1ae3324fda..68303450a4 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-comment-textnodes.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-comment-textnodes.ts @@ -1,9 +1,9 @@ -import * as AST from "@eslint-react/ast"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-complex-conditional-rendering.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-complex-conditional-rendering.ts index 886aaf7417..23c48a11ff 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-complex-conditional-rendering.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-complex-conditional-rendering.ts @@ -1,9 +1,9 @@ -import * as AST from "@eslint-react/ast"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-mount.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-mount.ts index 807259e58e..fc77d639cb 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-mount.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-mount.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { useComponentCollectorLegacy } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { useComponentCollectorLegacy } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-receive-props.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-receive-props.ts index 52b784dd74..296013476d 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-receive-props.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-receive-props.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { useComponentCollectorLegacy } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { useComponentCollectorLegacy } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-update.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-update.ts index 69fc396244..d70f62b764 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-update.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-component-will-update.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { useComponentCollectorLegacy } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { useComponentCollectorLegacy } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-context-provider.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-context-provider.ts index 90c087bb96..cf80cb1d81 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-context-provider.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-context-provider.ts @@ -1,10 +1,10 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; import { isComponentNameLoose } from "@eslint-react/core"; import * as JSX from "@eslint-react/jsx"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import { getSettingsFromContext } from "@eslint-react/shared"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { compare } from "compare-versions"; -import type { CamelCase } from "string-ts"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-create-ref.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-create-ref.ts index ae5d60dee9..b1ab22fe5b 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-create-ref.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-create-ref.ts @@ -1,8 +1,8 @@ -import * as AST from "@eslint-react/ast"; -import { isClassComponent, isCreateRefCall } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { isClassComponent, isCreateRefCall } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-default-props.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-default-props.ts index f119497cf1..da930ae2e3 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-default-props.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-default-props.ts @@ -1,10 +1,10 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; import * as AST from "@eslint-react/ast"; import { isClassComponent, isComponentNameLoose } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import * as VAR from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import type { CamelCase } from "string-ts"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-direct-mutation-state.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-direct-mutation-state.ts index 2df546d7b4..234f3c2438 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-direct-mutation-state.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-direct-mutation-state.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { isAssignmentToThisState, isClassComponent } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { isAssignmentToThisState, isClassComponent } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-duplicate-jsx-props.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-duplicate-jsx-props.ts index a78ed46e95..6fc31cff01 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-duplicate-jsx-props.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-duplicate-jsx-props.ts @@ -1,7 +1,7 @@ import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-duplicate-key.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-duplicate-key.ts index fd29b3a98d..1607ca3e75 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-duplicate-key.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-duplicate-key.ts @@ -1,9 +1,9 @@ -import * as AST from "@eslint-react/ast"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-forward-ref.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-forward-ref.ts index 2100145375..0d5ffba2ea 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-forward-ref.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-forward-ref.ts @@ -1,13 +1,13 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { TSESTree } from "@typescript-eslint/types"; +import type { RuleFix, RuleFixer, RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; import * as AST from "@eslint-react/ast"; import { isForwardRefCall } from "@eslint-react/core"; import { _ } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import { getSettingsFromContext } from "@eslint-react/shared"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { RuleFix, RuleFixer, RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { compare } from "compare-versions"; -import type { CamelCase } from "string-ts"; import { match, P } from "ts-pattern"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-implicit-key.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-implicit-key.ts index 49405eda66..9b9af2e50b 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-implicit-key.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-implicit-key.ts @@ -1,9 +1,9 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-leaked-conditional-rendering.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-leaked-conditional-rendering.ts index ddad719136..cf4051526a 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-leaked-conditional-rendering.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-leaked-conditional-rendering.ts @@ -1,15 +1,15 @@ +import type { TSESTree } from "@typescript-eslint/types"; +import type { ReportDescriptor, RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; import * as AST from "@eslint-react/ast"; import { _, flow } from "@eslint-react/eff"; import { createReport, type RuleContext, type RuleFeature } from "@eslint-react/kit"; import { getSettingsFromContext } from "@eslint-react/shared"; import * as VAR from "@eslint-react/var"; import { getConstrainedTypeAtLocation } from "@typescript-eslint/type-utils"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { ESLintUtils } from "@typescript-eslint/utils"; -import type { ReportDescriptor, RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { compare } from "compare-versions"; -import type { CamelCase } from "string-ts"; import { isFalseLiteralType, isTrueLiteralType, isTypeFlagSet, unionTypeParts } from "ts-api-utils"; import { isMatching, match, P } from "ts-pattern"; import ts from "typescript"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-component-display-name.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-component-display-name.ts index f5960d11b1..8a16fdf19a 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-component-display-name.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-component-display-name.ts @@ -1,8 +1,8 @@ -import * as AST from "@eslint-react/ast"; -import { DEFAULT_COMPONENT_HINT, ERComponentFlag, useComponentCollector } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { DEFAULT_COMPONENT_HINT, ERComponentFlag, useComponentCollector } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-context-display-name.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-context-display-name.ts index 887d703d1c..fe48a4835d 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-context-display-name.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-context-display-name.ts @@ -1,14 +1,14 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { TSESTree } from "@typescript-eslint/types"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; import { DISPLAY_NAME_ASSIGNMENT_SELECTOR, getInstanceId, isCreateContextCall, isInstanceIdEqual, } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import type { CamelCase } from "string-ts"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-key.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-key.ts index e30a93556e..38c117a488 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-key.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-missing-key.ts @@ -1,10 +1,10 @@ +import type { TSESTree } from "@typescript-eslint/types"; +import type { ReportDescriptor, RuleListener } from "@typescript-eslint/utils/ts-eslint"; import * as AST from "@eslint-react/ast"; import { isChildrenToArrayCall } from "@eslint-react/core"; import * as JSX from "@eslint-react/jsx"; import { createReport, type RuleContext, type RuleFeature } from "@eslint-react/kit"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { ReportDescriptor, RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-nested-component-definitions.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-nested-component-definitions.ts index 9be5e4f97f..13db80a7f3 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-nested-component-definitions.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-nested-component-definitions.ts @@ -1,3 +1,6 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { TSESTree } from "@typescript-eslint/types"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import * as AST from "@eslint-react/ast"; import { ERComponentHint, @@ -9,10 +12,7 @@ import { useComponentCollectorLegacy, } from "@eslint-react/core"; import * as JSX from "@eslint-react/jsx"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-prop-types.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-prop-types.ts index 24b46f5b23..29cd42e360 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-prop-types.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-prop-types.ts @@ -1,10 +1,10 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; import * as AST from "@eslint-react/ast"; import { isClassComponent, isComponentNameLoose } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import * as VAR from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import type { CamelCase } from "string-ts"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-redundant-should-component-update.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-redundant-should-component-update.ts index a6e692c52c..fcea6fbde0 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-redundant-should-component-update.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-redundant-should-component-update.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { ERComponentFlag, useComponentCollectorLegacy } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { ERComponentFlag, useComponentCollectorLegacy } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-did-mount.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-did-mount.ts index 9dd8cdcb81..24cdd3c199 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-did-mount.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-did-mount.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { isClassComponent, isThisSetState } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { isClassComponent, isThisSetState } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-did-update.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-did-update.ts index ed9073d186..242df31512 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-did-update.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-did-update.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { isClassComponent, isThisSetState } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { isClassComponent, isThisSetState } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-will-update.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-will-update.ts index db62317e98..99750867d8 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-will-update.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-set-state-in-component-will-update.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { isClassComponent, isThisSetState } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { isClassComponent, isThisSetState } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-string-refs.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-string-refs.ts index 0ffbd39438..2de54dfbfc 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-string-refs.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-string-refs.ts @@ -1,8 +1,8 @@ import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-mount.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-mount.ts index 2b498798ab..faf5fde5db 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-mount.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-mount.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { useComponentCollectorLegacy } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { useComponentCollectorLegacy } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-receive-props.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-receive-props.ts index ee51782062..1128cdc7f2 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-receive-props.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-receive-props.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { useComponentCollectorLegacy } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { useComponentCollectorLegacy } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-update.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-update.ts index c4e4acb9e1..58bff78b69 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-update.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unsafe-component-will-update.ts @@ -1,10 +1,10 @@ -import * as AST from "@eslint-react/ast"; -import { useComponentCollectorLegacy } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { useComponentCollectorLegacy } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unstable-context-value.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unstable-context-value.ts index 7110af4939..dd73602cde 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unstable-context-value.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unstable-context-value.ts @@ -1,12 +1,12 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import * as AST from "@eslint-react/ast"; import { isReactHookCall, useComponentCollector } from "@eslint-react/core"; import { getOrUpdate } from "@eslint-react/eff"; import * as JSX from "@eslint-react/jsx"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import { getSettingsFromContext } from "@eslint-react/shared"; import * as VAR from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { compare } from "compare-versions"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unstable-default-props.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unstable-default-props.ts index 03c4ae6235..4bb3aa0d01 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unstable-default-props.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unstable-default-props.ts @@ -1,12 +1,12 @@ +import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { TSESTree } from "@typescript-eslint/types"; +import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import type { CamelCase } from "string-ts"; import * as AST from "@eslint-react/ast"; import { isReactHookCall, useComponentCollector } from "@eslint-react/core"; import { getOrUpdate } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import * as VAR from "@eslint-react/var"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import type { CamelCase } from "string-ts"; import { match } from "ts-pattern"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-class-component-members.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-class-component-members.ts index 7d101254c0..9f940ec56c 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-class-component-members.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-class-component-members.ts @@ -1,11 +1,11 @@ -import * as AST from "@eslint-react/ast"; -import { isClassComponent } from "@eslint-react/core"; -import { constFalse, constTrue } from "@eslint-react/eff"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { isClassComponent } from "@eslint-react/core"; +import { constFalse, constTrue } from "@eslint-react/eff"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { match } from "ts-pattern"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-state.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-state.ts index 4611634ad4..a44e1f463c 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-state.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-state.ts @@ -1,12 +1,12 @@ -import * as AST from "@eslint-react/ast"; -import { isAssignmentToThisState, isClassComponent, isGetDerivedStateFromProps } from "@eslint-react/core"; import type { _ } from "@eslint-react/eff"; -import { constFalse, constTrue } from "@eslint-react/eff"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { isAssignmentToThisState, isClassComponent, isGetDerivedStateFromProps } from "@eslint-react/core"; +import { constFalse, constTrue } from "@eslint-react/eff"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { isMatching, match, P } from "ts-pattern"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-use-context.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-use-context.ts index b15aa8bda8..b0a85b8d7a 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-use-context.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-use-context.ts @@ -1,11 +1,11 @@ -import { isReactHookCall, isReactHookCallWithNameAlias } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import { compare } from "compare-versions"; import type { CamelCase } from "string-ts"; +import { isReactHookCall, isReactHookCallWithNameAlias } from "@eslint-react/core"; +import { getSettingsFromContext } from "@eslint-react/shared"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; +import { compare } from "compare-versions"; import { isMatching } from "ts-pattern"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-useless-forward-ref.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-useless-forward-ref.ts index 195cd6ed43..7010f2e28b 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-useless-forward-ref.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-useless-forward-ref.ts @@ -1,9 +1,9 @@ -// Ported from https://github.com/jsx-eslint/eslint-plugin-react/pull/3667 -import * as AST from "@eslint-react/ast"; -import { isForwardRefCall } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +// Ported from https://github.com/jsx-eslint/eslint-plugin-react/pull/3667 +import * as AST from "@eslint-react/ast"; +import { isForwardRefCall } from "@eslint-react/core"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-useless-fragment.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-useless-fragment.ts index 374e6e50f8..0d44a79a6c 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-useless-fragment.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-useless-fragment.ts @@ -1,9 +1,9 @@ -import * as AST from "@eslint-react/ast"; -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleFixer, RuleListener } from "@typescript-eslint/utils/ts-eslint"; +import * as AST from "@eslint-react/ast"; +import * as JSX from "@eslint-react/jsx"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-destructuring-assignment.ts b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-destructuring-assignment.ts index 6fd367588c..0d8a59ea0b 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-destructuring-assignment.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-destructuring-assignment.ts @@ -1,11 +1,11 @@ -import * as AST from "@eslint-react/ast"; -import { isComponentNameLoose, useComponentCollector } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { Scope } from "@typescript-eslint/scope-manager"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as AST from "@eslint-react/ast"; +import { isComponentNameLoose, useComponentCollector } from "@eslint-react/core"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-react-namespace-import.ts b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-react-namespace-import.ts index ff61f65e7e..0d4f5ecb27 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-react-namespace-import.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-react-namespace-import.ts @@ -1,8 +1,8 @@ import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { getSettingsFromContext } from "@eslint-react/shared"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-read-only-props.ts b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-read-only-props.ts index 2114339657..f3f1449d6c 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-read-only-props.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-read-only-props.ts @@ -1,11 +1,11 @@ -import { useComponentCollector } from "@eslint-react/core"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { getConstrainedTypeAtLocation, isTypeReadonly } from "@typescript-eslint/type-utils"; -import { ESLintUtils, type ParserServicesWithTypeInformation } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; -import { getTypeImmutability, isImmutable, isReadonlyDeep, isReadonlyShallow, isUnknown } from "is-immutable-type"; import type { CamelCase } from "string-ts"; import type ts from "typescript"; +import { useComponentCollector } from "@eslint-react/core"; +import { getConstrainedTypeAtLocation, isTypeReadonly } from "@typescript-eslint/type-utils"; +import { ESLintUtils, type ParserServicesWithTypeInformation } from "@typescript-eslint/utils"; +import { getTypeImmutability, isImmutable, isReadonlyDeep, isReadonlyShallow, isUnknown } from "is-immutable-type"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-shorthand-boolean.ts b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-shorthand-boolean.ts index 212e301e5d..f8c49fa87a 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-shorthand-boolean.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-shorthand-boolean.ts @@ -1,9 +1,9 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-shorthand-fragment.ts b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-shorthand-fragment.ts index 854d1af1bf..7b292bd22b 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-shorthand-fragment.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-shorthand-fragment.ts @@ -1,8 +1,8 @@ -import * as JSX from "@eslint-react/jsx"; import type { RuleContext, RuleFeature } from "@eslint-react/kit"; import type { TSESTree } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import * as JSX from "@eslint-react/jsx"; import { createRule } from "../utils"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/use-jsx-vars.ts b/packages/plugins/eslint-plugin-react-x/src/rules/use-jsx-vars.ts index 2bac4e3bcc..736d2b071c 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/use-jsx-vars.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/use-jsx-vars.ts @@ -1,7 +1,7 @@ import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { createRule } from "../utils"; diff --git a/packages/shared/src/settings.ts b/packages/shared/src/settings.ts index 6ce7fdf786..9313e444dd 100644 --- a/packages/shared/src/settings.ts +++ b/packages/shared/src/settings.ts @@ -1,16 +1,16 @@ /* eslint-disable no-restricted-syntax */ import type { _ } from "@eslint-react/eff"; -import { identity } from "@eslint-react/eff"; import type { SharedConfigurationSettings } from "@typescript-eslint/utils/ts-eslint"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { PartialDeep } from "type-fest"; +import type { CustomHooks, ESLintReactSettings } from "./schemas"; +import { identity } from "@eslint-react/eff"; import { shallowEqual } from "fast-equals"; import memoize from "micro-memoize"; import pm from "picomatch"; import { match, P } from "ts-pattern"; -import type { PartialDeep } from "type-fest"; -import { parse } from "valibot"; +import { parse } from "valibot"; import { getReactVersion } from "./get-react-version"; -import type { CustomHooks, ESLintReactSettings } from "./schemas"; import { DEFAULT_ESLINT_REACT_SETTINGS, ESLintSettingsSchema } from "./schemas"; export interface CustomComponentNormalized { diff --git a/packages/utilities/ast/src/function-init-path.ts b/packages/utilities/ast/src/function-init-path.ts index 575b9465d6..9b60d68a32 100644 --- a/packages/utilities/ast/src/function-init-path.ts +++ b/packages/utilities/ast/src/function-init-path.ts @@ -1,8 +1,8 @@ -import { _ } from "@eslint-react/eff"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; - import type { TSESTreeFunction } from "./types"; +import { _ } from "@eslint-react/eff"; + +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; export type FunctionInitPath = /** diff --git a/packages/utilities/ast/src/get-class-identifier.spec.ts b/packages/utilities/ast/src/get-class-identifier.spec.ts index 496779a4a1..2b60e053c9 100644 --- a/packages/utilities/ast/src/get-class-identifier.spec.ts +++ b/packages/utilities/ast/src/get-class-identifier.spec.ts @@ -1,13 +1,13 @@ -import path from "node:path"; +import type { TSESTreeClass } from "./types"; +import path from "node:path"; import { parseForESLint } from "@typescript-eslint/parser"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { simpleTraverse } from "@typescript-eslint/typescript-estree"; -import { describe, expect, it } from "vitest"; +import { describe, expect, it } from "vitest"; import { getFixturesRootDir } from "../../../../test"; import { getClassIdentifier } from "./get-class-identifier"; -import type { TSESTreeClass } from "./types"; function parse(code: string) { return parseForESLint(code, { diff --git a/packages/utilities/ast/src/get-class-identifier.ts b/packages/utilities/ast/src/get-class-identifier.ts index 7dc4f86862..889624871a 100644 --- a/packages/utilities/ast/src/get-class-identifier.ts +++ b/packages/utilities/ast/src/get-class-identifier.ts @@ -1,8 +1,8 @@ -import { _ } from "@eslint-react/eff"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; - import type { TSESTreeClass } from "./types"; +import { _ } from "@eslint-react/eff"; + +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; /** * Gets class identifier from ClassDeclaration or ClassExpression diff --git a/packages/utilities/ast/src/get-ecma-expression.ts b/packages/utilities/ast/src/get-ecma-expression.ts index 26202bde41..e5fdf46cbd 100644 --- a/packages/utilities/ast/src/get-ecma-expression.ts +++ b/packages/utilities/ast/src/get-ecma-expression.ts @@ -1,7 +1,7 @@ import type { TSESTree } from "@typescript-eslint/types"; -import { isTypeExpression } from "./is"; import type { TSESTreeTypeExpression } from "./types"; +import { isTypeExpression } from "./is"; /** * Recursively get the inner expression until it's not a TypeExpression diff --git a/packages/utilities/ast/src/get-function-identifier.spec.ts b/packages/utilities/ast/src/get-function-identifier.spec.ts index a4cb588ff8..29c2c48271 100644 --- a/packages/utilities/ast/src/get-function-identifier.spec.ts +++ b/packages/utilities/ast/src/get-function-identifier.spec.ts @@ -1,14 +1,14 @@ -import path from "node:path"; +import type { TSESTreeFunction } from "./types"; +import path from "node:path"; import { parseForESLint } from "@typescript-eslint/parser"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { simpleTraverse } from "@typescript-eslint/typescript-estree"; -import { describe, expect, it } from "vitest"; +import { describe, expect, it } from "vitest"; import { getFixturesRootDir } from "../../../../test"; import { getFunctionIdentifier } from "./get-function-identifier"; import { isFunction } from "./is"; -import type { TSESTreeFunction } from "./types"; function parse(code: string) { return parseForESLint(code, { diff --git a/packages/utilities/ast/src/get-function-identifier.ts b/packages/utilities/ast/src/get-function-identifier.ts index 95098d30cd..e6e24d918f 100644 --- a/packages/utilities/ast/src/get-function-identifier.ts +++ b/packages/utilities/ast/src/get-function-identifier.ts @@ -7,12 +7,12 @@ * same AST nodes with some exceptions to better fit our use case. */ -import { _ } from "@eslint-react/eff"; import type { TSESTree } from "@typescript-eslint/types"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; +import type { TSESTreeFunction } from "./types"; +import { _ } from "@eslint-react/eff"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { isMethodOrProperty, isTypeAssertionExpression } from "./is"; -import type { TSESTreeFunction } from "./types"; export function getFunctionIdentifier(node: TSESTree.Expression | TSESTreeFunction): TSESTree.Identifier | _ { switch (true) { diff --git a/packages/utilities/ast/src/get-nested-return-statements.spec.ts b/packages/utilities/ast/src/get-nested-return-statements.spec.ts index 53e938b433..3c8157a3bd 100644 --- a/packages/utilities/ast/src/get-nested-return-statements.spec.ts +++ b/packages/utilities/ast/src/get-nested-return-statements.spec.ts @@ -1,15 +1,15 @@ -import path from "node:path"; +import type { TSESTreeFunction } from "./types"; +import path from "node:path"; import { parseForESLint } from "@typescript-eslint/parser"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { simpleTraverse } from "@typescript-eslint/typescript-estree"; import tsx from "dedent"; -import { describe, expect, it } from "vitest"; +import { describe, expect, it } from "vitest"; import { getFixturesRootDir } from "../../../../test"; import { getNestedReturnStatements } from "./get-nested-return-statements"; import { isFunction } from "./is"; -import type { TSESTreeFunction } from "./types"; function parse(code: string) { return parseForESLint(code, { diff --git a/packages/utilities/ast/src/get-top-level-identifier.ts b/packages/utilities/ast/src/get-top-level-identifier.ts index c222ded300..8f9e5c7821 100644 --- a/packages/utilities/ast/src/get-top-level-identifier.ts +++ b/packages/utilities/ast/src/get-top-level-identifier.ts @@ -1,5 +1,5 @@ -import { _ } from "@eslint-react/eff"; import type { TSESTree } from "@typescript-eslint/types"; +import { _ } from "@eslint-react/eff"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; export function getTopLevelIdentifier(node: TSESTree.Node): TSESTree.Identifier | _ { diff --git a/packages/utilities/ast/src/is-empty-function.ts b/packages/utilities/ast/src/is-empty-function.ts index 4d3f082820..d737789ab2 100644 --- a/packages/utilities/ast/src/is-empty-function.ts +++ b/packages/utilities/ast/src/is-empty-function.ts @@ -1,7 +1,7 @@ -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; - import type { TSESTreeFunction } from "./types"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; + export function isEmptyFunction(node: TSESTreeFunction) { return node.body.type === T.BlockStatement && node.body.body.length === 0; diff --git a/packages/utilities/ast/src/is-node-equal.ts b/packages/utilities/ast/src/is-node-equal.ts index bffd332d3c..6322de1b8f 100644 --- a/packages/utilities/ast/src/is-node-equal.ts +++ b/packages/utilities/ast/src/is-node-equal.ts @@ -1,5 +1,5 @@ -import { dual } from "@eslint-react/eff"; import type { TSESTree } from "@typescript-eslint/types"; +import { dual } from "@eslint-react/eff"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; /** diff --git a/packages/utilities/ast/src/is.ts b/packages/utilities/ast/src/is.ts index a9453f9226..22475e1657 100644 --- a/packages/utilities/ast/src/is.ts +++ b/packages/utilities/ast/src/is.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ +import type { TSESTree } from "@typescript-eslint/utils"; import { or } from "@eslint-react/eff"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; -import type { TSESTree } from "@typescript-eslint/utils"; import { ASTUtils } from "@typescript-eslint/utils"; export const is = ASTUtils.isNodeOfType; diff --git a/packages/utilities/jsx/src/find-parent-attribute.ts b/packages/utilities/jsx/src/find-parent-attribute.ts index af1e9e66a8..7b295fd094 100644 --- a/packages/utilities/jsx/src/find-parent-attribute.ts +++ b/packages/utilities/jsx/src/find-parent-attribute.ts @@ -1,7 +1,7 @@ -import * as AST from "@eslint-react/ast"; import type { _ } from "@eslint-react/eff"; -import { constTrue } from "@eslint-react/eff"; import type { TSESTree } from "@typescript-eslint/types"; +import * as AST from "@eslint-react/ast"; +import { constTrue } from "@eslint-react/eff"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; /** diff --git a/packages/utilities/jsx/src/get-attribute-value.ts b/packages/utilities/jsx/src/get-attribute-value.ts index 9ff2a662f1..5b1f504074 100644 --- a/packages/utilities/jsx/src/get-attribute-value.ts +++ b/packages/utilities/jsx/src/get-attribute-value.ts @@ -1,7 +1,7 @@ -import * as VAR from "@eslint-react/var"; import type { Scope } from "@typescript-eslint/scope-manager"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; +import * as VAR from "@eslint-react/var"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { match, P } from "ts-pattern"; /** diff --git a/packages/utilities/jsx/src/get-attribute.ts b/packages/utilities/jsx/src/get-attribute.ts index 097caf09da..e6efc3b35d 100644 --- a/packages/utilities/jsx/src/get-attribute.ts +++ b/packages/utilities/jsx/src/get-attribute.ts @@ -1,8 +1,8 @@ import type { _ } from "@eslint-react/eff"; -import * as VAR from "@eslint-react/var"; import type { Scope } from "@typescript-eslint/scope-manager"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; +import * as VAR from "@eslint-react/var"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { getAttributeName } from "./get-attribute-name"; diff --git a/packages/utilities/jsx/src/is-jsx-value.ts b/packages/utilities/jsx/src/is-jsx-value.ts index 42a13efd35..802059ef29 100644 --- a/packages/utilities/jsx/src/is-jsx-value.ts +++ b/packages/utilities/jsx/src/is-jsx-value.ts @@ -1,10 +1,10 @@ /* eslint-disable @typescript-eslint/strict-boolean-expressions */ -import * as AST from "@eslint-react/ast"; import type { _ } from "@eslint-react/eff"; -import * as VAR from "@eslint-react/var"; import type { Scope } from "@typescript-eslint/scope-manager"; -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; +import * as AST from "@eslint-react/ast"; +import * as VAR from "@eslint-react/var"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; // type ReactNode = // | ReactElement diff --git a/packages/utilities/jsx/src/is-literal.ts b/packages/utilities/jsx/src/is-literal.ts index 0d0f041407..fbd1df130f 100644 --- a/packages/utilities/jsx/src/is-literal.ts +++ b/packages/utilities/jsx/src/is-literal.ts @@ -1,5 +1,5 @@ -import * as AST from "@eslint-react/ast"; import type { TSESTree } from "@typescript-eslint/types"; +import * as AST from "@eslint-react/ast"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; /** diff --git a/packages/utilities/jsx/src/to-string.ts b/packages/utilities/jsx/src/to-string.ts index 3cd1bf53a3..9b6382d227 100644 --- a/packages/utilities/jsx/src/to-string.ts +++ b/packages/utilities/jsx/src/to-string.ts @@ -1,5 +1,5 @@ -import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; +import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; /** * Get the stringified representation of a JSX node diff --git a/packages/utilities/kit/package.json b/packages/utilities/kit/package.json index 156777c996..df19ff7999 100644 --- a/packages/utilities/kit/package.json +++ b/packages/utilities/kit/package.json @@ -45,15 +45,15 @@ "@eslint-react/eff": "workspace:*", "ts-pattern": "^5.6.2" }, - "peerDependencies": { - "@typescript-eslint/utils": "^8.27.0" - }, "devDependencies": { "@local/configs": "workspace:*", "@tsconfig/node22": "^22.0.0", "tsup": "^8.4.0", "type-fest": "^4.37.0" }, + "peerDependencies": { + "@typescript-eslint/utils": "^8.27.0" + }, "engines": { "bun": ">=1.0.15", "node": ">=18.18.0" diff --git a/packages/utilities/var/src/find-variable.ts b/packages/utilities/var/src/find-variable.ts index d63575766d..25347792c8 100644 --- a/packages/utilities/var/src/find-variable.ts +++ b/packages/utilities/var/src/find-variable.ts @@ -1,6 +1,6 @@ -import { _, dual } from "@eslint-react/eff"; import type { Scope, Variable } from "@typescript-eslint/scope-manager"; import type { TSESTree } from "@typescript-eslint/types"; +import { _, dual } from "@eslint-react/eff"; import * as ASTUtils from "@typescript-eslint/utils/ast-utils"; export const findVariable: { diff --git a/packages/utilities/var/src/get-variable-declarator-id.ts b/packages/utilities/var/src/get-variable-declarator-id.ts index 7435f13250..087caabcc3 100644 --- a/packages/utilities/var/src/get-variable-declarator-id.ts +++ b/packages/utilities/var/src/get-variable-declarator-id.ts @@ -1,5 +1,5 @@ -import { _ } from "@eslint-react/eff"; import type { TSESTree } from "@typescript-eslint/types"; +import { _ } from "@eslint-react/eff"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; export function getVariableDeclaratorId( diff --git a/packages/utilities/var/src/get-variable-init-node.ts b/packages/utilities/var/src/get-variable-init-node.ts index b16c418bfc..1d2c58ec95 100644 --- a/packages/utilities/var/src/get-variable-init-node.ts +++ b/packages/utilities/var/src/get-variable-init-node.ts @@ -1,7 +1,7 @@ -import { _ } from "@eslint-react/eff"; import type { Variable } from "@typescript-eslint/scope-manager"; -import { DefinitionType } from "@typescript-eslint/scope-manager"; import type { TSESTree } from "@typescript-eslint/types"; +import { _ } from "@eslint-react/eff"; +import { DefinitionType } from "@typescript-eslint/scope-manager"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; export function getVariableInitNode(variable: Variable | _, at: number): diff --git a/packages/utilities/var/src/is-node-value-equal.ts b/packages/utilities/var/src/is-node-value-equal.ts index f8c03698a1..cef28c079f 100644 --- a/packages/utilities/var/src/is-node-value-equal.ts +++ b/packages/utilities/var/src/is-node-value-equal.ts @@ -1,7 +1,7 @@ +import type { TSESTree } from "@typescript-eslint/types"; import * as AST from "@eslint-react/ast"; import { _ } from "@eslint-react/eff"; import { DefinitionType, type Scope, type Variable } from "@typescript-eslint/scope-manager"; -import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { findVariable } from "./find-variable"; diff --git a/packages/utilities/var/src/value-construction.ts b/packages/utilities/var/src/value-construction.ts index 42e1c26562..86a643c906 100644 --- a/packages/utilities/var/src/value-construction.ts +++ b/packages/utilities/var/src/value-construction.ts @@ -1,6 +1,6 @@ -import { _ } from "@eslint-react/eff"; import type { Scope } from "@typescript-eslint/scope-manager"; import type { TSESTree } from "@typescript-eslint/types"; +import { _ } from "@eslint-react/eff"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { getVariableInitNode } from "./get-variable-init-node"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9e1bca7caa..edc01299cd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -171,9 +171,6 @@ importers: eslint-plugin-regexp: specifier: ^2.7.0 version: 2.7.0(eslint@9.23.0(jiti@2.4.2)) - eslint-plugin-simple-import-sort: - specifier: ^12.1.1 - version: 12.1.1(eslint@9.23.0(jiti@2.4.2)) eslint-plugin-unicorn: specifier: ^57.0.0 version: 57.0.0(eslint@9.23.0(jiti@2.4.2)) @@ -231,9 +228,6 @@ importers: eslint-plugin-regexp: specifier: ^2.7.0 version: 2.7.0(eslint@9.23.0(jiti@2.4.2)) - eslint-plugin-simple-import-sort: - specifier: ^12.1.1 - version: 12.1.1(eslint@9.23.0(jiti@2.4.2)) eslint-plugin-unicorn: specifier: ^57.0.0 version: 57.0.0(eslint@9.23.0(jiti@2.4.2)) @@ -389,9 +383,6 @@ importers: eslint-plugin-react-refresh: specifier: ^0.4.19 version: 0.4.19(eslint@9.23.0(jiti@2.4.2)) - eslint-plugin-simple-import-sort: - specifier: ^12.1.1 - version: 12.1.1(eslint@9.23.0(jiti@2.4.2)) eslint-plugin-unicorn: specifier: ^57.0.0 version: 57.0.0(eslint@9.23.0(jiti@2.4.2)) @@ -4578,11 +4569,6 @@ packages: peerDependencies: eslint: '>=8.44.0' - eslint-plugin-simple-import-sort@12.1.1: - resolution: {integrity: sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==} - peerDependencies: - eslint: '>=5.0.0' - eslint-plugin-unicorn@57.0.0: resolution: {integrity: sha512-zUYYa6zfNdTeG9BISWDlcLmz16c+2Ck2o5ZDHh0UzXJz3DEP7xjmlVDTzbyV0W+XksgZ0q37WEWzN2D2Ze+g9Q==} engines: {node: '>=18.18'} @@ -10444,10 +10430,6 @@ snapshots: regexp-ast-analysis: 0.7.1 scslre: 0.3.0 - eslint-plugin-simple-import-sort@12.1.1(eslint@9.23.0(jiti@2.4.2)): - dependencies: - eslint: 9.23.0(jiti@2.4.2) - eslint-plugin-unicorn@57.0.0(eslint@9.23.0(jiti@2.4.2)): dependencies: '@babel/helper-validator-identifier': 7.25.9