diff --git a/.pkgs/eslint-plugin-local/dist/index.d.ts b/.pkgs/eslint-plugin-local/dist/index.d.ts index b52ea362b8..9241f69e80 100644 --- a/.pkgs/eslint-plugin-local/dist/index.d.ts +++ b/.pkgs/eslint-plugin-local/dist/index.d.ts @@ -1,4 +1,4 @@ -import { CompatiblePlugin } from "@eslint-react/kit"; +import { CompatiblePlugin } from "@eslint-react/shared"; //#region src/index.d.ts declare const plugin: CompatiblePlugin; diff --git a/.pkgs/eslint-plugin-local/package.json b/.pkgs/eslint-plugin-local/package.json index 3e88e3b8e0..e002e1b832 100644 --- a/.pkgs/eslint-plugin-local/package.json +++ b/.pkgs/eslint-plugin-local/package.json @@ -22,7 +22,6 @@ "dependencies": { "@eslint-react/ast": "workspace:*", "@eslint-react/eff": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@eslint-react/var": "workspace:*", "@eslint/js": "^9.37.0", diff --git a/.pkgs/eslint-plugin-local/src/index.ts b/.pkgs/eslint-plugin-local/src/index.ts index 2b291d34c8..2f72701acf 100644 --- a/.pkgs/eslint-plugin-local/src/index.ts +++ b/.pkgs/eslint-plugin-local/src/index.ts @@ -1,6 +1,6 @@ import { name, version } from "../package.json"; -import type { CompatiblePlugin } from "@eslint-react/kit"; +import type { CompatiblePlugin } from "@eslint-react/shared"; import avoidMultilineTemplateExpression from "./rules/avoid-multiline-template-expression"; import preferEqeqNullishComparison from "./rules/prefer-eqeq-nullish-comparison"; 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..a75b9c6a2e 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,5 +1,5 @@ import * as AST from "@eslint-react/ast"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; diff --git a/.pkgs/eslint-plugin-local/src/rules/prefer-eqeq-nullish-comparison.ts b/.pkgs/eslint-plugin-local/src/rules/prefer-eqeq-nullish-comparison.ts index 8ddbf46e9a..61ce09715f 100644 --- a/.pkgs/eslint-plugin-local/src/rules/prefer-eqeq-nullish-comparison.ts +++ b/.pkgs/eslint-plugin-local/src/rules/prefer-eqeq-nullish-comparison.ts @@ -1,6 +1,6 @@ // Ported from: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin-internal/src/rules/eqeq-nullish.ts -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; import { NullThrowsReasons, type RuleListener, nullThrows } from "@typescript-eslint/utils/eslint-utils"; diff --git a/apps/website/content/docs/contributing.mdx b/apps/website/content/docs/contributing.mdx index 5601e70779..f304e1f6ed 100644 --- a/apps/website/content/docs/contributing.mdx +++ b/apps/website/content/docs/contributing.mdx @@ -29,7 +29,6 @@ flowchart TB subgraph "Utilities Modules" AST["AST Module"]:::utilities Eff["Eff Module"]:::utilities - Kit["Kit Module"]:::utilities Var["Var Module"]:::utilities end @@ -68,12 +67,10 @@ flowchart TB %% Utilities used by Core and Plugins AST ---|"provides"| Core Eff ---|"provides"| Core - Kit ---|"provides"| Core Var ---|"provides"| Core AST ---|"provides"| ReactX Eff ---|"provides"| ReactX - Kit ---|"provides"| ReactX Var ---|"provides"| ReactX %% Aggregation of Plugins @@ -92,7 +89,6 @@ flowchart TB Scripts -->|"CI/CD"| Shared Scripts -->|"CI/CD"| AST Scripts -->|"CI/CD"| Eff - Scripts -->|"CI/CD"| Kit Scripts -->|"CI/CD"| Var Scripts -->|"CI/CD"| ReactX Scripts -->|"CI/CD"| ReactDOM @@ -109,7 +105,6 @@ flowchart TB click Shared "https://github.com/rel1cx/eslint-react/tree/main/packages/shared" click AST "https://github.com/rel1cx/eslint-react/tree/main/packages/utilities/ast" click Eff "https://github.com/rel1cx/eslint-react/tree/main/packages/utilities/eff" - click Kit "https://github.com/rel1cx/eslint-react/tree/main/packages/utilities/kit" click Var "https://github.com/rel1cx/eslint-react/tree/main/packages/utilities/var" click ReactX "https://github.com/rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x" click ReactDOM "https://github.com/rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom" @@ -143,7 +138,6 @@ This section provides a summary of the packages in the monorepo. - `packages/utilities/eff`: JavaScript and TypeScript utilities (previously some re-exports of the `effect` library) - `packages/utilities/ast`: TSESTree AST utility module for static analysis - `packages/utilities/var`: TSESTree AST utility module for static analysis of variables - - `packages/utilities/kit`: ESLint React's plugin kit for building plugins and rules - **Core & Shared** - `packages/core`: Utility module for static analysis of React core APIs and patterns - `packages/shared`: Shared constants, types and functions diff --git a/apps/website/content/docs/faq.mdx b/apps/website/content/docs/faq.mdx index 4fc34a1f2b..bf8be3c9d1 100644 --- a/apps/website/content/docs/faq.mdx +++ b/apps/website/content/docs/faq.mdx @@ -24,7 +24,6 @@ import { Accordion, Accordions } from "fumadocs-ui/components/accordion"; - `@eslint-react/eff`: JavaScript and TypeScript utilities (previously some re-exports of the `effect` library). - `@eslint-react/ast`: TSESTree AST utility module. - `@eslint-react/var`: TSESTree AST utility module for static analysis of variables. - - `@eslint-react/kit`: ESLint React's plugin kit for building plugins and rules. - **Core & Shared Modules** - `@eslint-react/core`: Utility module for static analysis of React core APIs and patterns. - `@eslint-react/shared`: Shared constants, types and functions. diff --git a/apps/website/package.json b/apps/website/package.json index ded8ef9253..8546347ee0 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -32,7 +32,6 @@ "devDependencies": { "@effect/language-service": "^0.44.0", "@eslint-react/eslint-plugin": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@eslint/js": "^9.37.0", "@local/configs": "workspace:*", diff --git a/examples/with-ts-blank-eslint-parser/package.json b/examples/with-ts-blank-eslint-parser/package.json index 73874a0ba7..11db649f73 100644 --- a/examples/with-ts-blank-eslint-parser/package.json +++ b/examples/with-ts-blank-eslint-parser/package.json @@ -16,7 +16,6 @@ }, "devDependencies": { "@eslint-react/eslint-plugin": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@eslint/config-inspector": "^1.3.0", "@eslint/js": "^9.37.0", diff --git a/packages/core/package.json b/packages/core/package.json index ea19b7e8e0..97dcc6df3d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -36,7 +36,6 @@ "dependencies": { "@eslint-react/ast": "workspace:*", "@eslint-react/eff": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@eslint-react/var": "workspace:*", "@typescript-eslint/scope-manager": "^8.46.0", diff --git a/packages/core/src/component/component-children.ts b/packages/core/src/component/component-children.ts index 95f0d12d3d..36c1fcb1a8 100644 --- a/packages/core/src/component/component-children.ts +++ b/packages/core/src/component/component-children.ts @@ -1,4 +1,4 @@ -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { isCreateElementCall } from "../utils/is-react-api"; diff --git a/packages/core/src/component/component-collector.ts b/packages/core/src/component/component-collector.ts index 6408a90af4..4780582bb2 100644 --- a/packages/core/src/component/component-collector.ts +++ b/packages/core/src/component/component-collector.ts @@ -1,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { unit } from "@eslint-react/eff"; -import { type RuleContext } from "@eslint-react/kit"; +import { type RuleContext } from "@eslint-react/shared"; import { getId } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; diff --git a/packages/core/src/component/component-definition.ts b/packages/core/src/component/component-definition.ts index 93d3299aea..cff3edb98e 100644 --- a/packages/core/src/component/component-definition.ts +++ b/packages/core/src/component/component-definition.ts @@ -1,5 +1,5 @@ import * as AST from "@eslint-react/ast"; -import { type RuleContext } from "@eslint-react/kit"; +import { type RuleContext } from "@eslint-react/shared"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { P, isMatching } from "ts-pattern"; import { isChildrenOfCreateElement } from "./component-children"; diff --git a/packages/core/src/component/component-id.ts b/packages/core/src/component/component-id.ts index 18b254a251..01ebe7e636 100644 --- a/packages/core/src/component/component-id.ts +++ b/packages/core/src/component/component-id.ts @@ -1,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { unit } from "@eslint-react/eff"; -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { isComponentWrapperCallLoose } from "./component-wrapper"; diff --git a/packages/core/src/component/component-name.ts b/packages/core/src/component/component-name.ts index e23caa5577..3fa3ec1a38 100644 --- a/packages/core/src/component/component-name.ts +++ b/packages/core/src/component/component-name.ts @@ -1,6 +1,6 @@ import type * as AST from "@eslint-react/ast"; import { unit } from "@eslint-react/eff"; -import { RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, type RuleContext } from "@eslint-react/kit"; +import { RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, type RuleContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { getFunctionComponentId } from "./component-id"; diff --git a/packages/core/src/component/component-render-prop.ts b/packages/core/src/component/component-render-prop.ts index 2e5302f2fa..74382420c4 100644 --- a/packages/core/src/component/component-render-prop.ts +++ b/packages/core/src/component/component-render-prop.ts @@ -1,5 +1,5 @@ import * as AST from "@eslint-react/ast"; -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { JsxDetectionHint, isJsxLike } from "../jsx"; diff --git a/packages/core/src/component/component-wrapper.ts b/packages/core/src/component/component-wrapper.ts index 5584856036..26038b008a 100644 --- a/packages/core/src/component/component-wrapper.ts +++ b/packages/core/src/component/component-wrapper.ts @@ -1,4 +1,4 @@ -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; diff --git a/packages/core/src/jsx/jsx-attribute-name.ts b/packages/core/src/jsx/jsx-attribute-name.ts index a332de3538..1beed31d9c 100644 --- a/packages/core/src/jsx/jsx-attribute-name.ts +++ b/packages/core/src/jsx/jsx-attribute-name.ts @@ -1,4 +1,4 @@ -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/utils"; import { stringifyJsx } from "./jsx-stringify"; diff --git a/packages/core/src/jsx/jsx-attribute-value.ts b/packages/core/src/jsx/jsx-attribute-value.ts index 0f32b146c8..d74a5922eb 100644 --- a/packages/core/src/jsx/jsx-attribute-value.ts +++ b/packages/core/src/jsx/jsx-attribute-value.ts @@ -1,7 +1,7 @@ import type * as AST from "@eslint-react/ast"; import { unit } from "@eslint-react/eff"; import { identity } from "@eslint-react/eff"; -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { getStaticValue } from "@typescript-eslint/utils/ast-utils"; diff --git a/packages/core/src/jsx/jsx-attribute.ts b/packages/core/src/jsx/jsx-attribute.ts index 938e7da1a0..fc3d6732ee 100644 --- a/packages/core/src/jsx/jsx-attribute.ts +++ b/packages/core/src/jsx/jsx-attribute.ts @@ -1,4 +1,4 @@ -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import { findProperty, findVariable, getVariableDefinitionNode } from "@eslint-react/var"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; diff --git a/packages/core/src/jsx/jsx-config.ts b/packages/core/src/jsx/jsx-config.ts index 57590c1b49..063c201029 100644 --- a/packages/core/src/jsx/jsx-config.ts +++ b/packages/core/src/jsx/jsx-config.ts @@ -6,7 +6,7 @@ import { RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, type RuleContext, -} from "@eslint-react/kit"; +} from "@eslint-react/shared"; // Constants for JSX emit settings. export const JsxEmit = { diff --git a/packages/core/src/jsx/jsx-element-is.ts b/packages/core/src/jsx/jsx-element-is.ts index c568e76e2a..4d821df06f 100644 --- a/packages/core/src/jsx/jsx-element-is.ts +++ b/packages/core/src/jsx/jsx-element-is.ts @@ -1,4 +1,4 @@ -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { getJsxElementType } from "./jsx-element-type"; diff --git a/packages/core/src/jsx/jsx-element-type.ts b/packages/core/src/jsx/jsx-element-type.ts index 09a209914c..c51c4d5c30 100644 --- a/packages/core/src/jsx/jsx-element-type.ts +++ b/packages/core/src/jsx/jsx-element-type.ts @@ -1,4 +1,4 @@ -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import { stringifyJsx } from "./jsx-stringify"; diff --git a/packages/core/src/utils/is-instance-id-equal.ts b/packages/core/src/utils/is-instance-id-equal.ts index c76d06ee5d..30daaa519a 100644 --- a/packages/core/src/utils/is-instance-id-equal.ts +++ b/packages/core/src/utils/is-instance-id-equal.ts @@ -1,6 +1,6 @@ /* eslint-disable jsdoc/require-param */ import * as AST from "@eslint-react/ast"; -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import { isNodeValueEqual } from "@eslint-react/var"; import type { TSESTree } from "@typescript-eslint/types"; diff --git a/packages/core/src/utils/is-react-api.ts b/packages/core/src/utils/is-react-api.ts index 61c87c4ded..583a8c0f30 100644 --- a/packages/core/src/utils/is-react-api.ts +++ b/packages/core/src/utils/is-react-api.ts @@ -1,7 +1,7 @@ /* eslint-disable function/function-return-boolean */ import * as AST from "@eslint-react/ast"; import { dual, type unit } from "@eslint-react/eff"; -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import { AST_NODE_TYPES as T, type TSESTree } from "@typescript-eslint/types"; export declare namespace isReactAPI { diff --git a/packages/plugins/eslint-plugin-react-debug/package.json b/packages/plugins/eslint-plugin-react-debug/package.json index 4280848206..45c0977cda 100644 --- a/packages/plugins/eslint-plugin-react-debug/package.json +++ b/packages/plugins/eslint-plugin-react-debug/package.json @@ -44,7 +44,6 @@ "@eslint-react/ast": "workspace:*", "@eslint-react/core": "workspace:*", "@eslint-react/eff": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@eslint-react/var": "workspace:*", "@typescript-eslint/scope-manager": "^8.46.0", diff --git a/packages/plugins/eslint-plugin-react-debug/src/configs/all.ts b/packages/plugins/eslint-plugin-react-debug/src/configs/all.ts index 9067ce8dd4..1311a93f61 100644 --- a/packages/plugins/eslint-plugin-react-debug/src/configs/all.ts +++ b/packages/plugins/eslint-plugin-react-debug/src/configs/all.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared"; export const name = "react-debug/all"; diff --git a/packages/plugins/eslint-plugin-react-debug/src/plugin.ts b/packages/plugins/eslint-plugin-react-debug/src/plugin.ts index 1e39fb8638..ed5c5db58c 100644 --- a/packages/plugins/eslint-plugin-react-debug/src/plugin.ts +++ b/packages/plugins/eslint-plugin-react-debug/src/plugin.ts @@ -1,4 +1,4 @@ -import type { CompatiblePlugin } from "@eslint-react/kit"; +import type { CompatiblePlugin } from "@eslint-react/shared"; import { name, version } from "../package.json"; 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 d5416f175b..32939988dd 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,5 +1,5 @@ import { useComponentCollectorLegacy } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 9da332a46e..31b64ec529 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,5 +1,5 @@ import { ComponentFlag, DEFAULT_COMPONENT_DETECTION_HINT, useComponentCollector } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 770e54ff9e..3df00738cc 100644 --- a/packages/plugins/eslint-plugin-react-debug/src/rules/hook.ts +++ b/packages/plugins/eslint-plugin-react-debug/src/rules/hook.ts @@ -1,5 +1,5 @@ import { useHookCollector } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 4dd791f472..e354ea1ebe 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,5 +1,5 @@ import { isInitializedFromReact } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import type { Scope } from "@typescript-eslint/scope-manager"; import type { TSESTree } from "@typescript-eslint/utils"; diff --git a/packages/plugins/eslint-plugin-react-debug/src/rules/jsx.ts b/packages/plugins/eslint-plugin-react-debug/src/rules/jsx.ts index 7134226a9b..5a858546dc 100644 --- a/packages/plugins/eslint-plugin-react-debug/src/rules/jsx.ts +++ b/packages/plugins/eslint-plugin-react-debug/src/rules/jsx.ts @@ -6,7 +6,7 @@ import { isJsxFragmentElement, } from "@eslint-react/core"; import { flow } from "@eslint-react/eff"; -import { type RuleContext, type RuleFeature, report } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature, report } from "@eslint-react/shared"; import { AST_NODE_TYPES as T, type TSESTree } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; diff --git a/packages/plugins/eslint-plugin-react-dom/package.json b/packages/plugins/eslint-plugin-react-dom/package.json index b64142e03e..ad113eedb5 100644 --- a/packages/plugins/eslint-plugin-react-dom/package.json +++ b/packages/plugins/eslint-plugin-react-dom/package.json @@ -44,7 +44,6 @@ "@eslint-react/ast": "workspace:*", "@eslint-react/core": "workspace:*", "@eslint-react/eff": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@eslint-react/var": "workspace:*", "@typescript-eslint/scope-manager": "^8.46.0", diff --git a/packages/plugins/eslint-plugin-react-dom/src/configs/recommended.ts b/packages/plugins/eslint-plugin-react-dom/src/configs/recommended.ts index f4498eb571..055130959b 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/configs/recommended.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/configs/recommended.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared"; import { plugin } from "../plugin"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/configs/strict.ts b/packages/plugins/eslint-plugin-react-dom/src/configs/strict.ts index 9a3ce75929..8a8e439b8e 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/configs/strict.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/configs/strict.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as recommendedConfig from "./recommended"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/plugin.ts b/packages/plugins/eslint-plugin-react-dom/src/plugin.ts index 5fd506248a..e415e4db15 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/plugin.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/plugin.ts @@ -1,4 +1,4 @@ -import type { CompatiblePlugin } from "@eslint-react/kit"; +import type { CompatiblePlugin } from "@eslint-react/shared"; import { name, version } from "../package.json"; 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 5455a832fd..662cfadb6b 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,5 +1,5 @@ import { getJsxAttribute, isJsxText } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } 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"; 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 f088183d1b..58cc0b1d85 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,5 +1,5 @@ import { getJsxAttribute } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 643547fef4..3a28a1a5ae 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,4 +1,4 @@ -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; 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 a98ff60cd0..b1d6918970 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,4 +1,4 @@ -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; 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 a6074ce90f..28fce6bda5 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,4 +1,4 @@ -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; 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 12d0e91c73..1d68298a48 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,5 +1,5 @@ import { getJsxAttribute } from "@eslint-react/core"; -import type { RuleContext, RuleFeature, RuleSuggest } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature, RuleSuggest } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 7ec62a296d..d20db783da 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,5 +1,5 @@ import { getJsxAttribute, resolveJsxAttributeValue } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 b184568513..59955588e6 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,5 +1,5 @@ import { getJsxElementType } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 bcd8b7344d..a14fd8a151 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,4 +1,4 @@ -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; 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 5fe326b5a4..f407e884b2 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,4 +1,4 @@ -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; 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 6f99e72b08..7c80776e16 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,5 +1,5 @@ import { resolveJsxAttributeValue } from "@eslint-react/core"; -import { RE_JAVASCRIPT_PROTOCOL, type RuleContext, type RuleFeature } from "@eslint-react/kit"; +import { RE_JAVASCRIPT_PROTOCOL, type RuleContext, type RuleFeature } from "@eslint-react/shared"; 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"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-string-style-prop.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-string-style-prop.ts index 8a5a0aef2b..0595b8204e 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-string-style-prop.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-string-style-prop.ts @@ -1,5 +1,5 @@ import { getJsxAttribute, isJsxHostElement, resolveJsxAttributeValue } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/no-unknown-property.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/no-unknown-property.ts index ae3194ad2d..572566c2ec 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/no-unknown-property.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/no-unknown-property.ts @@ -2,8 +2,8 @@ // Ported from https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/no-unknown-property.js // TODO: Port to TypeScript // @ts-nocheck -import { report } from "@eslint-react/kit"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import { report } from "@eslint-react/shared"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import type { JSXAttribute } from "@typescript-eslint/types/dist/ast-spec"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; 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 5e8d6217a7..486e28a0f0 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,5 +1,5 @@ import { getJsxAttribute, resolveJsxAttributeValue } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 149915675d..a2e531b157 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,5 +1,5 @@ import { getJsxAttribute, resolveJsxAttributeValue } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } 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"; 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 6e5663b0c0..7c112c0396 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,4 +1,4 @@ -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; 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 d62b0799ee..9c6738812c 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,5 +1,5 @@ import { getJsxAttribute } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/rules/prefer-namespace-import.ts b/packages/plugins/eslint-plugin-react-dom/src/rules/prefer-namespace-import.ts index e3e88ddecf..e0ea719fae 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/rules/prefer-namespace-import.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/rules/prefer-namespace-import.ts @@ -1,4 +1,4 @@ -import { type RuleContext, type RuleFeature } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature } 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"; diff --git a/packages/plugins/eslint-plugin-react-dom/src/utils/create-jsx-element-resolver.ts b/packages/plugins/eslint-plugin-react-dom/src/utils/create-jsx-element-resolver.ts index 8c4f803cda..8e4224bf6c 100644 --- a/packages/plugins/eslint-plugin-react-dom/src/utils/create-jsx-element-resolver.ts +++ b/packages/plugins/eslint-plugin-react-dom/src/utils/create-jsx-element-resolver.ts @@ -1,5 +1,5 @@ import { getJsxAttribute, getJsxElementType, resolveJsxAttributeValue } from "@eslint-react/core"; -import type { RuleContext } from "@eslint-react/kit"; +import type { RuleContext } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/package.json b/packages/plugins/eslint-plugin-react-hooks-extra/package.json index 8aadce1b4b..c99eb31ed0 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/package.json +++ b/packages/plugins/eslint-plugin-react-hooks-extra/package.json @@ -45,7 +45,6 @@ "@eslint-react/ast": "workspace:*", "@eslint-react/core": "workspace:*", "@eslint-react/eff": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@eslint-react/var": "workspace:*", "@typescript-eslint/scope-manager": "^8.46.0", diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/configs/recommended.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/configs/recommended.ts index d591986532..8748056315 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/configs/recommended.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/configs/recommended.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; export const name = "react-hooks-extra/recommended"; diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/plugin.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/plugin.ts index 0c638e1052..77b7651bd2 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/plugin.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/plugin.ts @@ -1,4 +1,4 @@ -import type { CompatiblePlugin } from "@eslint-react/kit"; +import type { CompatiblePlugin } from "@eslint-react/shared"; import { name, version } from "../package.json"; diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-direct-set-state-in-use-effect.ts b/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-direct-set-state-in-use-effect.ts index ffc6a13bd0..4dc39aa6dc 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-direct-set-state-in-use-effect.ts +++ b/packages/plugins/eslint-plugin-react-hooks-extra/src/rules/no-direct-set-state-in-use-effect.ts @@ -1,7 +1,7 @@ import * as AST from "@eslint-react/ast"; import { isUseCallbackCall, isUseEffectLikeCall, isUseMemoCall, isUseStateCall } from "@eslint-react/core"; import { constVoid, getOrElseUpdate, not } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { findVariable, getVariableDefinitionNode } from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/utils"; diff --git a/packages/plugins/eslint-plugin-react-naming-convention/package.json b/packages/plugins/eslint-plugin-react-naming-convention/package.json index 5b46833cc5..215cafae2e 100644 --- a/packages/plugins/eslint-plugin-react-naming-convention/package.json +++ b/packages/plugins/eslint-plugin-react-naming-convention/package.json @@ -44,7 +44,6 @@ "@eslint-react/ast": "workspace:*", "@eslint-react/core": "workspace:*", "@eslint-react/eff": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@eslint-react/var": "workspace:*", "@typescript-eslint/scope-manager": "^8.46.0", diff --git a/packages/plugins/eslint-plugin-react-naming-convention/src/configs/recommended.ts b/packages/plugins/eslint-plugin-react-naming-convention/src/configs/recommended.ts index 73154d5427..a220e8d927 100644 --- a/packages/plugins/eslint-plugin-react-naming-convention/src/configs/recommended.ts +++ b/packages/plugins/eslint-plugin-react-naming-convention/src/configs/recommended.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; export const name = "react-naming-convention/recommended"; diff --git a/packages/plugins/eslint-plugin-react-naming-convention/src/plugin.ts b/packages/plugins/eslint-plugin-react-naming-convention/src/plugin.ts index 7bb00cfba6..90783b842d 100644 --- a/packages/plugins/eslint-plugin-react-naming-convention/src/plugin.ts +++ b/packages/plugins/eslint-plugin-react-naming-convention/src/plugin.ts @@ -1,4 +1,4 @@ -import type { CompatiblePlugin } from "@eslint-react/kit"; +import type { CompatiblePlugin } from "@eslint-react/shared"; import { name, version } from "../package.json"; 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 dd10025d82..74a7ba346f 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,8 +1,8 @@ import * as AST from "@eslint-react/ast"; import { useComponentCollector, useComponentCollectorLegacy } from "@eslint-react/core"; import type { unit } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; -import { RE_CONSTANT_CASE, RE_PASCAL_CASE, toRegExp } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; +import { RE_CONSTANT_CASE, RE_PASCAL_CASE, toRegExp } from "@eslint-react/shared"; import type { JSONSchema4 } from "@typescript-eslint/utils/json-schema"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; 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 4ba5882930..a27b96d42f 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,6 +1,6 @@ import { getInstanceId, isComponentName, isCreateContextCall } from "@eslint-react/core"; import { identity } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { P, match } from "ts-pattern"; 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 ad769095b8..33424ba5d7 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,6 +1,6 @@ import type { unit } from "@eslint-react/eff"; import { isObject } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { JSONSchema4 } from "@typescript-eslint/utils/json-schema"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; 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 7f882c5013..04615ba987 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,6 +1,6 @@ import type { unit } 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, toRegExp } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; +import { RE_CAMEL_CASE, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, toRegExp } from "@eslint-react/shared"; import type { JSONSchema4 } from "@typescript-eslint/utils/json-schema"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import path from "node:path"; 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 e3b9449bca..f5ac877f2f 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,5 +1,5 @@ import { getInstanceId, isUseStateCall } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } 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"; diff --git a/packages/plugins/eslint-plugin-react-web-api/package.json b/packages/plugins/eslint-plugin-react-web-api/package.json index 5d0aa3ac11..d8e7978455 100644 --- a/packages/plugins/eslint-plugin-react-web-api/package.json +++ b/packages/plugins/eslint-plugin-react-web-api/package.json @@ -44,7 +44,6 @@ "@eslint-react/ast": "workspace:*", "@eslint-react/core": "workspace:*", "@eslint-react/eff": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@eslint-react/var": "workspace:*", "@typescript-eslint/scope-manager": "^8.46.0", diff --git a/packages/plugins/eslint-plugin-react-web-api/src/configs/recommended.ts b/packages/plugins/eslint-plugin-react-web-api/src/configs/recommended.ts index d77d872f43..35d105056f 100644 --- a/packages/plugins/eslint-plugin-react-web-api/src/configs/recommended.ts +++ b/packages/plugins/eslint-plugin-react-web-api/src/configs/recommended.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared"; export const name = "react-web-api/recommended"; diff --git a/packages/plugins/eslint-plugin-react-web-api/src/plugin.ts b/packages/plugins/eslint-plugin-react-web-api/src/plugin.ts index 0d064c931d..e6ac500448 100644 --- a/packages/plugins/eslint-plugin-react-web-api/src/plugin.ts +++ b/packages/plugins/eslint-plugin-react-web-api/src/plugin.ts @@ -1,4 +1,4 @@ -import type { CompatiblePlugin } from "@eslint-react/kit"; +import type { CompatiblePlugin } from "@eslint-react/shared"; import { name, version } from "../package.json"; 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 347d59af90..ceb3df2947 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 @@ -6,7 +6,7 @@ import { isInversePhase, } from "@eslint-react/core"; import { unit } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { findProperty, findVariable, getVariableDefinitionNode, isNodeValueEqual } from "@eslint-react/var"; import type { Scope } from "@typescript-eslint/scope-manager"; import type { TSESTree } from "@typescript-eslint/utils"; 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 02ba743b35..a80ae2a179 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 @@ -5,7 +5,7 @@ import { getPhaseKindOfFunction, isInstanceIdEqual, } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { findAssignmentTarget } from "@eslint-react/var"; import type { TSESTree } from "@typescript-eslint/utils"; import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; 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 fa544ab19e..df55750bee 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 @@ -8,7 +8,7 @@ import { } from "@eslint-react/core"; import type { unit } from "@eslint-react/eff"; import { or } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { findVariable, getVariableDefinitionNode } from "@eslint-react/var"; import type { TSESTree } from "@typescript-eslint/utils"; import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; 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 bbc7c0ab87..b0b3e7e599 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 @@ -5,7 +5,7 @@ import { getPhaseKindOfFunction, isInstanceIdEqual, } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { findAssignmentTarget } from "@eslint-react/var"; import type { TSESTree } from "@typescript-eslint/utils"; import { AST_NODE_TYPES as T } from "@typescript-eslint/utils"; diff --git a/packages/plugins/eslint-plugin-react-x/package.json b/packages/plugins/eslint-plugin-react-x/package.json index 7b26ac4525..b4010083d7 100644 --- a/packages/plugins/eslint-plugin-react-x/package.json +++ b/packages/plugins/eslint-plugin-react-x/package.json @@ -43,7 +43,6 @@ "@eslint-react/ast": "workspace:*", "@eslint-react/core": "workspace:*", "@eslint-react/eff": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@eslint-react/var": "workspace:*", "@typescript-eslint/scope-manager": "^8.46.0", diff --git a/packages/plugins/eslint-plugin-react-x/src/configs/_ts.ts b/packages/plugins/eslint-plugin-react-x/src/configs/_ts.ts index c4ee3d1853..33781a0148 100644 --- a/packages/plugins/eslint-plugin-react-x/src/configs/_ts.ts +++ b/packages/plugins/eslint-plugin-react-x/src/configs/_ts.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; /** * Disables rules that are already handled by TypeScript diff --git a/packages/plugins/eslint-plugin-react-x/src/configs/disable-type-checked.ts b/packages/plugins/eslint-plugin-react-x/src/configs/disable-type-checked.ts index a141c2ae5c..6492e41278 100644 --- a/packages/plugins/eslint-plugin-react-x/src/configs/disable-type-checked.ts +++ b/packages/plugins/eslint-plugin-react-x/src/configs/disable-type-checked.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; export const name = "react-x/disable-type-checked"; diff --git a/packages/plugins/eslint-plugin-react-x/src/configs/recommended-type-checked.ts b/packages/plugins/eslint-plugin-react-x/src/configs/recommended-type-checked.ts index 016a4a9191..fde3f89e15 100644 --- a/packages/plugins/eslint-plugin-react-x/src/configs/recommended-type-checked.ts +++ b/packages/plugins/eslint-plugin-react-x/src/configs/recommended-type-checked.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as recommendedTypescript from "./recommended-typescript"; diff --git a/packages/plugins/eslint-plugin-react-x/src/configs/recommended-typescript.ts b/packages/plugins/eslint-plugin-react-x/src/configs/recommended-typescript.ts index b183fd9d4b..d2c8f3b554 100644 --- a/packages/plugins/eslint-plugin-react-x/src/configs/recommended-typescript.ts +++ b/packages/plugins/eslint-plugin-react-x/src/configs/recommended-typescript.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as ts from "./_ts"; import * as recommended from "./recommended"; diff --git a/packages/plugins/eslint-plugin-react-x/src/configs/recommended.ts b/packages/plugins/eslint-plugin-react-x/src/configs/recommended.ts index c504c10a5b..da623f16d3 100644 --- a/packages/plugins/eslint-plugin-react-x/src/configs/recommended.ts +++ b/packages/plugins/eslint-plugin-react-x/src/configs/recommended.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared"; import { plugin } from "../plugin"; diff --git a/packages/plugins/eslint-plugin-react-x/src/configs/strict-type-checked.ts b/packages/plugins/eslint-plugin-react-x/src/configs/strict-type-checked.ts index a45e63b3b7..feefb64bdb 100644 --- a/packages/plugins/eslint-plugin-react-x/src/configs/strict-type-checked.ts +++ b/packages/plugins/eslint-plugin-react-x/src/configs/strict-type-checked.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as strictTypeScript from "./strict-typescript"; diff --git a/packages/plugins/eslint-plugin-react-x/src/configs/strict-typescript.ts b/packages/plugins/eslint-plugin-react-x/src/configs/strict-typescript.ts index f13f2be8c3..18bb3400ae 100644 --- a/packages/plugins/eslint-plugin-react-x/src/configs/strict-typescript.ts +++ b/packages/plugins/eslint-plugin-react-x/src/configs/strict-typescript.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as ts from "./_ts"; import * as strict from "./strict"; diff --git a/packages/plugins/eslint-plugin-react-x/src/configs/strict.ts b/packages/plugins/eslint-plugin-react-x/src/configs/strict.ts index 1143c7763c..d29edb0a22 100644 --- a/packages/plugins/eslint-plugin-react-x/src/configs/strict.ts +++ b/packages/plugins/eslint-plugin-react-x/src/configs/strict.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as recommended from "./recommended"; export const name = "react-x/strict"; diff --git a/packages/plugins/eslint-plugin-react-x/src/plugin.ts b/packages/plugins/eslint-plugin-react-x/src/plugin.ts index 61cdc134cd..b50461c47c 100644 --- a/packages/plugins/eslint-plugin-react-x/src/plugin.ts +++ b/packages/plugins/eslint-plugin-react-x/src/plugin.ts @@ -1,4 +1,4 @@ -import type { CompatiblePlugin } from "@eslint-react/kit"; +import type { CompatiblePlugin } from "@eslint-react/shared"; import { name, version } from "../package.json"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.ts b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.ts index fd2a87fa52..dc242897bb 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-key-before-spread.ts @@ -1,4 +1,4 @@ -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-comment-textnodes.ts b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-comment-textnodes.ts index 896238ecca..e3697820cc 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-comment-textnodes.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-comment-textnodes.ts @@ -1,5 +1,5 @@ import * as AST from "@eslint-react/ast"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } 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"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-duplicate-props.ts b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-duplicate-props.ts index dcf2ae073d..a941d477bf 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-duplicate-props.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-duplicate-props.ts @@ -1,4 +1,4 @@ -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-iife.ts b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-iife.ts index 42f8dbb87b..fa4a190e3d 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-iife.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-iife.ts @@ -1,5 +1,5 @@ import type * as AST from "@eslint-react/ast"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-undef.ts b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-undef.ts index e876475b66..bf24d2aaa4 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-undef.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-undef.ts @@ -1,4 +1,4 @@ -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { findVariable } from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-boolean.ts b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-boolean.ts index 77744a98fd..8e14ceb300 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-boolean.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-boolean.ts @@ -1,6 +1,6 @@ import { getJsxAttributeName } from "@eslint-react/core"; import type { unit } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature, RulePolicy } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature, RulePolicy } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { JSONSchema4 } from "@typescript-eslint/utils/json-schema"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-fragment.ts b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-fragment.ts index 13d9573510..c8ea4f0584 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-fragment.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-shorthand-fragment.ts @@ -1,6 +1,6 @@ import { getJsxConfigFromAnnotation, getJsxConfigFromContext, isJsxFragmentElement } from "@eslint-react/core"; import type { unit } from "@eslint-react/eff"; -import { type RuleContext, type RuleFeature, type RulePolicy } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature, type RulePolicy } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import type { JSONSchema4 } from "@typescript-eslint/utils/json-schema"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-react.ts b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-react.ts index 85702d5ab8..50b0b465d8 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-react.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-react.ts @@ -1,5 +1,5 @@ import { JsxEmit, getJsxConfigFromAnnotation, getJsxConfigFromContext } from "@eslint-react/core"; -import { type RuleContext, type RuleFeature } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature } 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"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-vars.ts b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-vars.ts index c4cd99285e..a9bb5f4b06 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-vars.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-vars.ts @@ -1,4 +1,4 @@ -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; 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 782d610268..8f8fcf4529 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,7 +1,7 @@ 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 type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; 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 9aeb2e9189..de00b6bd11 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,7 +1,7 @@ import * as AST from "@eslint-react/ast"; import { isCloneElementCall, isCreateElementCall, isInitializedFromReact } from "@eslint-react/core"; import { unit } from "@eslint-react/eff"; -import { type RuleContext, type RuleFeature, report } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature, report } from "@eslint-react/shared"; import { coerceSettings } from "@eslint-react/shared"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { TSESTree } from "@typescript-eslint/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..2c556a7b69 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,5 +1,5 @@ import { isChildrenCount } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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..0216e44d6b 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,5 +1,5 @@ import { isChildrenForEach } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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..0f3a48a69d 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,5 +1,5 @@ import { isChildrenMap } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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..06b2f62b5f 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,5 +1,5 @@ import { isChildrenOnly } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 4686167b92..523b38a4eb 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,5 +1,5 @@ import { getJsxAttribute } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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..65e2aca88d 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,5 +1,5 @@ import { isChildrenToArray } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 e980c9fafa..6f2ac06633 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,5 +1,5 @@ import { isComponentDidCatch, isGetDerivedStateFromError, useComponentCollectorLegacy } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 ef38bc5eaa..030e2777dd 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,5 +1,5 @@ import { isCloneElementCall } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 2abdcbe952..46390a6d42 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,5 +1,5 @@ import { isComponentWillMount, useComponentCollectorLegacy } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 9c56d72497..d660b5396b 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,5 +1,5 @@ import { isComponentWillReceiveProps, useComponentCollectorLegacy } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 a403ef3979..960873a597 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,5 +1,5 @@ import { isComponentWillUpdate, useComponentCollectorLegacy } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 72b7cc2a73..33a119b87d 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,5 +1,5 @@ import { getJsxElementType, isComponentNameLoose } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { compare } from "compare-versions"; 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..83b50853ce 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { isClassComponent, isCreateRefCall } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 dcdb70092c..bf8338e495 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { isComponentNameLoose } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { findVariable, getVariableDefinitionNode } from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; 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 788a7e06ea..51f6995ba4 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { isAssignmentToThisState, isClassComponent } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; 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 0df80139b0..16dec97dcd 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,5 +1,5 @@ import * as AST from "@eslint-react/ast"; -import { type RuleContext, type RuleFeature } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature } 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"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-forbidden-props.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-forbidden-props.ts index 674e94b424..60a879539f 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-forbidden-props.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-forbidden-props.ts @@ -1,4 +1,4 @@ -import { type RuleContext, type RuleFeature, toRegExp } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature, toRegExp } from "@eslint-react/shared"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import { type CamelCase, camelCase } from "string-ts"; 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 cc24eb0996..0e85b4b14f 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { isForwardRefCall, isInitializedFromReact } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; 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 89f23da41c..b826b7180e 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,5 +1,5 @@ import { getJsxAttribute } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } 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"; 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 48d9ab5725..d034af88e0 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { flow, unit } from "@eslint-react/eff"; -import { type RuleContext, type RuleFeature, report } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature, report } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import { findVariable } from "@eslint-react/var"; import { getConstrainedTypeAtLocation } from "@typescript-eslint/type-utils"; 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 18ff4d5da7..448d8712cc 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { ComponentFlag, DEFAULT_COMPONENT_DETECTION_HINT, useComponentCollector } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 91282f90bb..db39d8564a 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { getInstanceId, isCreateContextCall, isInstanceIdEqual } from "@eslint-react/core"; -import { type RuleContext, type RuleFeature } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature } 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"; 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 c5c4298597..af2b2686db 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { getJsxAttribute, isChildrenToArrayCall } from "@eslint-react/core"; -import { type RuleContext, type RuleFeature, report } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature, report } from "@eslint-react/shared"; 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"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-misused-capture-owner-stack.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-misused-capture-owner-stack.ts index 9636730f22..217da4dc4e 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-misused-capture-owner-stack.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-misused-capture-owner-stack.ts @@ -1,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { isCaptureOwnerStackCall } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import { AST_NODE_TYPES as T, type TSESTree } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; 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 ee34faad9b..4b2831593b 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 @@ -10,7 +10,7 @@ import { useComponentCollector, useComponentCollectorLegacy, } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } 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"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-nested-lazy-component-declarations.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-nested-lazy-component-declarations.ts index dd9ef700ab..fee7c34333 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-nested-lazy-component-declarations.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-nested-lazy-component-declarations.ts @@ -8,7 +8,7 @@ import { useComponentCollector, useComponentCollectorLegacy, } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } 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"; 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 2cab98cc07..194511b610 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { isClassComponent, isComponentNameLoose } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { findVariable, getVariableDefinitionNode } from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; 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 8f0920aa48..03eee9a723 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { ComponentFlag, useComponentCollectorLegacy } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; 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 5a10d1343f..a9d0a8c24e 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { isClassComponent, isComponentDidMount, isThisSetState } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 660199e793..df58d704f9 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { isClassComponent, isComponentDidUpdate, isThisSetState } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 2718348b21..725bd3e53c 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { isClassComponent, isComponentWillUpdate, isThisSetState } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/utils"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 9e1958e906..451e43e477 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,5 +1,5 @@ import { isClassComponent } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } 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"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-key.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-key.ts index eb3c53fc89..c1f5b853d7 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-key.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-key.ts @@ -1,5 +1,5 @@ import * as AST from "@eslint-react/ast"; -import { type RuleContext, type RuleFeature } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature } 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"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-callback.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-callback.ts index c868e81596..a080f1e957 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-callback.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-callback.ts @@ -1,7 +1,7 @@ import * as AST from "@eslint-react/ast"; import { isUseCallbackCall } from "@eslint-react/core"; import { identity } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { findVariable, getChildScopes, getVariableDefinitionNode } from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-memo.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-memo.ts index 0e974a7d37..6c66f6b4f8 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-memo.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-memo.ts @@ -1,7 +1,7 @@ import * as AST from "@eslint-react/ast"; import { isUseMemoCall } from "@eslint-react/core"; import { identity } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { findVariable, getChildScopes, getVariableDefinitionNode } from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-prefix.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-prefix.ts index 9fef6741ad..f79056c55e 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-prefix.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unnecessary-use-prefix.ts @@ -1,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { useHookCollector } from "@eslint-react/core"; -import { type RuleContext, type RuleFeature } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature } 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"; 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 2ad88a7e99..a98c2fd79f 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,5 +1,5 @@ import { isUnsafeComponentWillMount, useComponentCollectorLegacy } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 d2edbf55b6..5e6152d4c4 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,5 +1,5 @@ import { isUnsafeComponentWillReceiveProps, useComponentCollectorLegacy } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 889d1bf45b..0b9f35a380 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,5 +1,5 @@ import { isUnsafeComponentWillUpdate, useComponentCollectorLegacy } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 ba764475e0..978c3ac8cd 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,7 +1,7 @@ import * as AST from "@eslint-react/ast"; import { getJsxElementType, isReactHookCall, useComponentCollector } from "@eslint-react/core"; import { getOrElseUpdate } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import { type Construction, getConstruction } from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; 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 dddc3c2c51..122b4b5ed5 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,7 +1,7 @@ import * as AST from "@eslint-react/ast"; import { isReactHookCall, useComponentCollector } from "@eslint-react/core"; import { getOrElseUpdate } from "@eslint-react/eff"; -import { type RuleContext, type RuleFeature } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature } from "@eslint-react/shared"; import { ConstructionDetectionHint, getConstruction } from "@eslint-react/var"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; 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 93260885aa..c836f8b12a 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,7 +1,7 @@ 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 type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-props.ts b/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-props.ts index 91acfc007b..9e398393dc 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-props.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/no-unused-props.ts @@ -1,5 +1,5 @@ import { useComponentCollector } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { Reference } 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/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 ed321fb0b6..1ba5185a1f 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 @@ -2,7 +2,7 @@ import * as AST from "@eslint-react/ast"; import { isAssignmentToThisState, isClassComponent, isGetDerivedStateFromProps } from "@eslint-react/core"; import type { unit } from "@eslint-react/eff"; import { constFalse, constTrue } from "@eslint-react/eff"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; 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 d85d5c608d..017b2b7c98 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,5 +1,5 @@ import { isReactHookCall, isUseContextCall } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import { AST_NODE_TYPES as T } from "@typescript-eslint/types"; 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 2461f1bc49..52bf7733f2 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,7 +1,7 @@ // 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 { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; 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 8344bebbab..a86d492669 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,7 +1,7 @@ /* eslint-disable jsdoc/require-param */ import * as AST from "@eslint-react/ast"; import { getJsxAttribute, isJsxFragmentElement, isJsxHostElement, isJsxText } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; 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 707b51abff..3a711a96f0 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,6 +1,6 @@ import * as AST from "@eslint-react/ast"; import { isComponentNameLoose, useComponentCollector } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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/packages/plugins/eslint-plugin-react-x/src/rules/prefer-namespace-import.ts b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-namespace-import.ts index d74b107fcb..38624d70fa 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-namespace-import.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-namespace-import.ts @@ -1,4 +1,4 @@ -import { type RuleContext, type RuleFeature } from "@eslint-react/kit"; +import { type RuleContext, type RuleFeature } from "@eslint-react/shared"; import { getSettingsFromContext } from "@eslint-react/shared"; import type { TSESTree } from "@typescript-eslint/types"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; 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 b37ed5038b..40e3b1971c 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,5 +1,5 @@ import { useComponentCollector } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; 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"; diff --git a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-use-state-lazy-initialization.ts b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-use-state-lazy-initialization.ts index e466fb6a1c..75b24c2162 100644 --- a/packages/plugins/eslint-plugin-react-x/src/rules/prefer-use-state-lazy-initialization.ts +++ b/packages/plugins/eslint-plugin-react-x/src/rules/prefer-use-state-lazy-initialization.ts @@ -1,7 +1,7 @@ // Ported from https://github.com/jsx-eslint/eslint-plugin-react/pull/3579/commits/ebb739a0fe99a2ee77055870bfda9f67a2691374 import * as AST from "@eslint-react/ast"; import { isReactHookName, isUseCall, isUseStateCall } from "@eslint-react/core"; -import type { RuleContext, RuleFeature } from "@eslint-react/kit"; +import type { RuleContext, RuleFeature } from "@eslint-react/shared"; import type { RuleListener } from "@typescript-eslint/utils/ts-eslint"; import type { CamelCase } from "string-ts"; diff --git a/packages/plugins/eslint-plugin/package.json b/packages/plugins/eslint-plugin/package.json index 22e8a87b2c..7a5ee1f859 100644 --- a/packages/plugins/eslint-plugin/package.json +++ b/packages/plugins/eslint-plugin/package.json @@ -44,7 +44,6 @@ }, "dependencies": { "@eslint-react/eff": "workspace:*", - "@eslint-react/kit": "workspace:*", "@eslint-react/shared": "workspace:*", "@typescript-eslint/scope-manager": "^8.46.0", "@typescript-eslint/type-utils": "^8.46.0", diff --git a/packages/plugins/eslint-plugin/src/configs/_ts.ts b/packages/plugins/eslint-plugin/src/configs/_ts.ts index 6c22f19d1b..62f4e27c1d 100644 --- a/packages/plugins/eslint-plugin/src/configs/_ts.ts +++ b/packages/plugins/eslint-plugin/src/configs/_ts.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; /** * Disables rules that are already handled by TypeScript diff --git a/packages/plugins/eslint-plugin/src/configs/all.ts b/packages/plugins/eslint-plugin/src/configs/all.ts index 28bd9ccced..0c3db8d800 100644 --- a/packages/plugins/eslint-plugin/src/configs/all.ts +++ b/packages/plugins/eslint-plugin/src/configs/all.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import reactDebug from "eslint-plugin-react-debug"; import reactHooksExtra from "eslint-plugin-react-hooks-extra"; import reactNamingConvention from "eslint-plugin-react-naming-convention"; diff --git a/packages/plugins/eslint-plugin/src/configs/debug.ts b/packages/plugins/eslint-plugin/src/configs/debug.ts index 57d3b5daed..6eb4f030e8 100644 --- a/packages/plugins/eslint-plugin/src/configs/debug.ts +++ b/packages/plugins/eslint-plugin/src/configs/debug.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import reactDebug from "eslint-plugin-react-debug"; diff --git a/packages/plugins/eslint-plugin/src/configs/disable-conflict-eslint-plugin-react.ts b/packages/plugins/eslint-plugin/src/configs/disable-conflict-eslint-plugin-react.ts index 3ffa9b3c05..d8831514ea 100644 --- a/packages/plugins/eslint-plugin/src/configs/disable-conflict-eslint-plugin-react.ts +++ b/packages/plugins/eslint-plugin/src/configs/disable-conflict-eslint-plugin-react.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; // This rulelist should be kept in sync with `apps/website/content/docs/migration.mdx` // Rules provided by `eslint-plugin-react` that exist in this plugin. diff --git a/packages/plugins/eslint-plugin/src/configs/disable-debug.ts b/packages/plugins/eslint-plugin/src/configs/disable-debug.ts index 153eee79a2..9b1e6e5fa9 100644 --- a/packages/plugins/eslint-plugin/src/configs/disable-debug.ts +++ b/packages/plugins/eslint-plugin/src/configs/disable-debug.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import { rules as debugRules } from "./debug"; diff --git a/packages/plugins/eslint-plugin/src/configs/disable-dom.ts b/packages/plugins/eslint-plugin/src/configs/disable-dom.ts index d2036662b1..4de390d2a1 100644 --- a/packages/plugins/eslint-plugin/src/configs/disable-dom.ts +++ b/packages/plugins/eslint-plugin/src/configs/disable-dom.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import { rules as domRules } from "./dom"; diff --git a/packages/plugins/eslint-plugin/src/configs/disable-type-checked.ts b/packages/plugins/eslint-plugin/src/configs/disable-type-checked.ts index e65dad965f..c3053f78cb 100644 --- a/packages/plugins/eslint-plugin/src/configs/disable-type-checked.ts +++ b/packages/plugins/eslint-plugin/src/configs/disable-type-checked.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; export const name = "@eslint-react/disable-type-checked"; diff --git a/packages/plugins/eslint-plugin/src/configs/disable-web-api.ts b/packages/plugins/eslint-plugin/src/configs/disable-web-api.ts index 0ae2127a7e..0316e610b1 100644 --- a/packages/plugins/eslint-plugin/src/configs/disable-web-api.ts +++ b/packages/plugins/eslint-plugin/src/configs/disable-web-api.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import { rules as webApiRules } from "./web-api"; diff --git a/packages/plugins/eslint-plugin/src/configs/dom.ts b/packages/plugins/eslint-plugin/src/configs/dom.ts index f6ee9a2809..58e4975eca 100644 --- a/packages/plugins/eslint-plugin/src/configs/dom.ts +++ b/packages/plugins/eslint-plugin/src/configs/dom.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import reactDom from "eslint-plugin-react-dom"; export const name = "@eslint-react/dom"; diff --git a/packages/plugins/eslint-plugin/src/configs/no-deprecated.ts b/packages/plugins/eslint-plugin/src/configs/no-deprecated.ts index 6b73d6624f..0c04e0eb97 100644 --- a/packages/plugins/eslint-plugin/src/configs/no-deprecated.ts +++ b/packages/plugins/eslint-plugin/src/configs/no-deprecated.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as dom from "./dom"; import * as x from "./x"; diff --git a/packages/plugins/eslint-plugin/src/configs/off.ts b/packages/plugins/eslint-plugin/src/configs/off.ts index 35204ad408..bd9e1ffe26 100644 --- a/packages/plugins/eslint-plugin/src/configs/off.ts +++ b/packages/plugins/eslint-plugin/src/configs/off.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import { rules as allRules } from "./all"; import { rules as disableTypeCheckedRules } from "./disable-type-checked"; diff --git a/packages/plugins/eslint-plugin/src/configs/recommended-type-checked.ts b/packages/plugins/eslint-plugin/src/configs/recommended-type-checked.ts index 9d1be548ab..b0c15d3073 100644 --- a/packages/plugins/eslint-plugin/src/configs/recommended-type-checked.ts +++ b/packages/plugins/eslint-plugin/src/configs/recommended-type-checked.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as recommendedTypeScript from "./recommended-typescript"; diff --git a/packages/plugins/eslint-plugin/src/configs/recommended-typescript.ts b/packages/plugins/eslint-plugin/src/configs/recommended-typescript.ts index f1549bda32..3ed2f5a4a5 100644 --- a/packages/plugins/eslint-plugin/src/configs/recommended-typescript.ts +++ b/packages/plugins/eslint-plugin/src/configs/recommended-typescript.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as ts from "./_ts"; import * as recommended from "./recommended"; diff --git a/packages/plugins/eslint-plugin/src/configs/recommended.ts b/packages/plugins/eslint-plugin/src/configs/recommended.ts index 186a1c6c3d..e2d36bf74a 100644 --- a/packages/plugins/eslint-plugin/src/configs/recommended.ts +++ b/packages/plugins/eslint-plugin/src/configs/recommended.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import reactDebug from "eslint-plugin-react-debug"; import reactHooksExtra from "eslint-plugin-react-hooks-extra"; import reactNamingConvention from "eslint-plugin-react-naming-convention"; diff --git a/packages/plugins/eslint-plugin/src/configs/strict-type-checked.ts b/packages/plugins/eslint-plugin/src/configs/strict-type-checked.ts index 3a29f5c2a8..28f963a8c3 100644 --- a/packages/plugins/eslint-plugin/src/configs/strict-type-checked.ts +++ b/packages/plugins/eslint-plugin/src/configs/strict-type-checked.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as strictTypeScript from "./strict-typescript"; diff --git a/packages/plugins/eslint-plugin/src/configs/strict-typescript.ts b/packages/plugins/eslint-plugin/src/configs/strict-typescript.ts index 94085fa2bb..1658d0bebd 100644 --- a/packages/plugins/eslint-plugin/src/configs/strict-typescript.ts +++ b/packages/plugins/eslint-plugin/src/configs/strict-typescript.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as ts from "./recommended-typescript"; import * as strict from "./strict"; diff --git a/packages/plugins/eslint-plugin/src/configs/strict.ts b/packages/plugins/eslint-plugin/src/configs/strict.ts index 131e56bc62..3330468708 100644 --- a/packages/plugins/eslint-plugin/src/configs/strict.ts +++ b/packages/plugins/eslint-plugin/src/configs/strict.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import * as recommended from "./recommended"; diff --git a/packages/plugins/eslint-plugin/src/configs/web-api.ts b/packages/plugins/eslint-plugin/src/configs/web-api.ts index d310d53a03..9439e0369f 100644 --- a/packages/plugins/eslint-plugin/src/configs/web-api.ts +++ b/packages/plugins/eslint-plugin/src/configs/web-api.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import reactWebApi from "eslint-plugin-react-web-api"; import * as x from "./x"; diff --git a/packages/plugins/eslint-plugin/src/configs/x.ts b/packages/plugins/eslint-plugin/src/configs/x.ts index cdfb064cf2..9169379919 100644 --- a/packages/plugins/eslint-plugin/src/configs/x.ts +++ b/packages/plugins/eslint-plugin/src/configs/x.ts @@ -1,4 +1,4 @@ -import type { RuleConfig } from "@eslint-react/kit"; +import type { RuleConfig } from "@eslint-react/shared"; import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared"; import react from "eslint-plugin-react-x"; diff --git a/packages/plugins/eslint-plugin/src/index.ts b/packages/plugins/eslint-plugin/src/index.ts index 68d2899edf..afed7ea991 100644 --- a/packages/plugins/eslint-plugin/src/index.ts +++ b/packages/plugins/eslint-plugin/src/index.ts @@ -1,6 +1,6 @@ import { name, version } from "../package.json"; -import type { CompatiblePlugin } from "@eslint-react/kit"; +import type { CompatiblePlugin } from "@eslint-react/shared"; import reactDebug from "eslint-plugin-react-debug"; import reactDom from "eslint-plugin-react-dom"; import reactHooksExtra from "eslint-plugin-react-hooks-extra"; diff --git a/packages/shared/docs/README.md b/packages/shared/docs/README.md index dc4b095d44..b588784385 100644 --- a/packages/shared/docs/README.md +++ b/packages/shared/docs/README.md @@ -6,12 +6,23 @@ ## Interfaces +- [CompatibleConfig](interfaces/CompatibleConfig.md) +- [CompatiblePlugin](interfaces/CompatiblePlugin.md) +- [CompatibleRule](interfaces/CompatibleRule.md) - [ESLintReactSettingsNormalized](interfaces/ESLintReactSettingsNormalized.md) +- [SettingsConfig](interfaces/SettingsConfig.md) ## Type Aliases - [ESLintReactSettings](type-aliases/ESLintReactSettings.md) - [ESLintSettings](type-aliases/ESLintSettings.md) +- [RuleContext](type-aliases/RuleContext.md) +- [RuleFeature](type-aliases/RuleFeature.md) +- [RulePolicy](type-aliases/RulePolicy.md) +- [RuleSuggest](type-aliases/RuleSuggest.md) +- [Severity](type-aliases/Severity.md) +- [SeverityLevel](type-aliases/SeverityLevel.md) +- [SeverityName](type-aliases/SeverityName.md) ## Variables @@ -20,6 +31,24 @@ - [defineSettings](variables/defineSettings.md) - [GITHUB\_URL](variables/GITHUB_URL.md) - [NPM\_SCOPE](variables/NPM_SCOPE.md) +- [RE\_ANNOTATION\_JSX](variables/RE_ANNOTATION_JSX.md) +- [RE\_ANNOTATION\_JSX\_FRAG](variables/RE_ANNOTATION_JSX_FRAG.md) +- [RE\_ANNOTATION\_JSX\_IMPORT\_SOURCE](variables/RE_ANNOTATION_JSX_IMPORT_SOURCE.md) +- [RE\_ANNOTATION\_JSX\_RUNTIME](variables/RE_ANNOTATION_JSX_RUNTIME.md) +- [RE\_CAMEL\_CASE](variables/RE_CAMEL_CASE.md) +- [RE\_COMPONENT\_NAME](variables/RE_COMPONENT_NAME.md) +- [RE\_COMPONENT\_NAME\_LOOSE](variables/RE_COMPONENT_NAME_LOOSE.md) +- [RE\_CONSTANT\_CASE](variables/RE_CONSTANT_CASE.md) +- [RE\_HOOK\_NAME](variables/RE_HOOK_NAME.md) +- [RE\_HTML\_TAG](variables/RE_HTML_TAG.md) +- [RE\_JAVASCRIPT\_PROTOCOL](variables/RE_JAVASCRIPT_PROTOCOL.md) +- [RE\_JS\_EXT](variables/RE_JS_EXT.md) +- [RE\_JS\_IDENTIFIER](variables/RE_JS_IDENTIFIER.md) +- [RE\_KEBAB\_CASE](variables/RE_KEBAB_CASE.md) +- [RE\_PASCAL\_CASE](variables/RE_PASCAL_CASE.md) +- [RE\_REGEXP\_STR](variables/RE_REGEXP_STR.md) +- [RE\_SNAKE\_CASE](variables/RE_SNAKE_CASE.md) +- [RE\_TS\_EXT](variables/RE_TS_EXT.md) - [WEBSITE\_URL](variables/WEBSITE_URL.md) ## Functions @@ -33,4 +62,7 @@ - [getSettingsFromContext](functions/getSettingsFromContext.md) - [isESLintReactSettings](functions/isESLintReactSettings.md) - [isESLintSettings](functions/isESLintSettings.md) +- [isRegExp](functions/isRegExp.md) - [normalizeSettings](functions/normalizeSettings.md) +- [report](functions/report.md) +- [toRegExp](functions/toRegExp.md) diff --git a/packages/shared/docs/functions/getConfigAdapters.md b/packages/shared/docs/functions/getConfigAdapters.md index 50aa3f9896..6f5318aed4 100644 --- a/packages/shared/docs/functions/getConfigAdapters.md +++ b/packages/shared/docs/functions/getConfigAdapters.md @@ -16,7 +16,7 @@ ### plugin -`CompatiblePlugin` +[`CompatiblePlugin`](../interfaces/CompatiblePlugin.md) ## Returns @@ -30,7 +30,7 @@ ##### config -`CompatibleConfig` +[`CompatibleConfig`](../interfaces/CompatibleConfig.md) #### Returns @@ -46,7 +46,7 @@ ###### Index Signature -\[`key`: `string`\]: `CompatiblePlugin` +\[`key`: `string`\]: [`CompatiblePlugin`](../interfaces/CompatiblePlugin.md) ##### rules? @@ -54,7 +54,7 @@ ##### settings? -> `optional` **settings**: `SettingsConfig` +> `optional` **settings**: [`SettingsConfig`](../interfaces/SettingsConfig.md) ### toLegacyConfig() @@ -64,7 +64,7 @@ ##### \_\_namedParameters -`CompatibleConfig` +[`CompatibleConfig`](../interfaces/CompatibleConfig.md) #### Returns diff --git a/packages/shared/docs/functions/getSettingsFromContext.md b/packages/shared/docs/functions/getSettingsFromContext.md index ab06e272d3..4b61641563 100644 --- a/packages/shared/docs/functions/getSettingsFromContext.md +++ b/packages/shared/docs/functions/getSettingsFromContext.md @@ -15,7 +15,7 @@ Uses caching for performance optimization ### context -`RuleContext` +[`RuleContext`](../type-aliases/RuleContext.md) The ESLint rule context diff --git a/packages/utilities/kit/docs/functions/isRegExp.md b/packages/shared/docs/functions/isRegExp.md similarity index 69% rename from packages/utilities/kit/docs/functions/isRegExp.md rename to packages/shared/docs/functions/isRegExp.md index 7de03f128c..d70e5657f2 100644 --- a/packages/utilities/kit/docs/functions/isRegExp.md +++ b/packages/shared/docs/functions/isRegExp.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / isRegExp +[@eslint-react/shared](../README.md) / isRegExp # Function: isRegExp() diff --git a/packages/shared/docs/functions/report.md b/packages/shared/docs/functions/report.md new file mode 100644 index 0000000000..da1efdeedc --- /dev/null +++ b/packages/shared/docs/functions/report.md @@ -0,0 +1,29 @@ +[**@eslint-react/shared**](../README.md) + +*** + +[@eslint-react/shared](../README.md) / report + +# Function: report() + +> **report**(`context`): (`descriptor?`) => `void` + +## Parameters + +### context + +[`RuleContext`](../type-aliases/RuleContext.md) + +## Returns + +> (`descriptor?`): `void` + +### Parameters + +#### descriptor? + +`ReportDescriptor`\<`string`\> | `null` + +### Returns + +`void` diff --git a/packages/utilities/kit/docs/functions/toRegExp.md b/packages/shared/docs/functions/toRegExp.md similarity index 86% rename from packages/utilities/kit/docs/functions/toRegExp.md rename to packages/shared/docs/functions/toRegExp.md index cbff14dab2..4cca1848c0 100644 --- a/packages/utilities/kit/docs/functions/toRegExp.md +++ b/packages/shared/docs/functions/toRegExp.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / toRegExp +[@eslint-react/shared](../README.md) / toRegExp # Function: toRegExp() diff --git a/packages/utilities/kit/docs/interfaces/CompatibleConfig.md b/packages/shared/docs/interfaces/CompatibleConfig.md similarity index 78% rename from packages/utilities/kit/docs/interfaces/CompatibleConfig.md rename to packages/shared/docs/interfaces/CompatibleConfig.md index f7a1139cfe..305cedeb17 100644 --- a/packages/utilities/kit/docs/interfaces/CompatibleConfig.md +++ b/packages/shared/docs/interfaces/CompatibleConfig.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / CompatibleConfig +[@eslint-react/shared](../README.md) / CompatibleConfig # Interface: CompatibleConfig diff --git a/packages/utilities/kit/docs/interfaces/CompatiblePlugin.md b/packages/shared/docs/interfaces/CompatiblePlugin.md similarity index 77% rename from packages/utilities/kit/docs/interfaces/CompatiblePlugin.md rename to packages/shared/docs/interfaces/CompatiblePlugin.md index e32570b7bb..2b012452b3 100644 --- a/packages/utilities/kit/docs/interfaces/CompatiblePlugin.md +++ b/packages/shared/docs/interfaces/CompatiblePlugin.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / CompatiblePlugin +[@eslint-react/shared](../README.md) / CompatiblePlugin # Interface: CompatiblePlugin diff --git a/packages/utilities/kit/docs/interfaces/CompatibleRule.md b/packages/shared/docs/interfaces/CompatibleRule.md similarity index 76% rename from packages/utilities/kit/docs/interfaces/CompatibleRule.md rename to packages/shared/docs/interfaces/CompatibleRule.md index ad5fbe6bf9..6d20b51df9 100644 --- a/packages/utilities/kit/docs/interfaces/CompatibleRule.md +++ b/packages/shared/docs/interfaces/CompatibleRule.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / CompatibleRule +[@eslint-react/shared](../README.md) / CompatibleRule # Interface: CompatibleRule diff --git a/packages/utilities/kit/docs/interfaces/SettingsConfig.md b/packages/shared/docs/interfaces/SettingsConfig.md similarity index 53% rename from packages/utilities/kit/docs/interfaces/SettingsConfig.md rename to packages/shared/docs/interfaces/SettingsConfig.md index 675ab6636a..64d269e103 100644 --- a/packages/utilities/kit/docs/interfaces/SettingsConfig.md +++ b/packages/shared/docs/interfaces/SettingsConfig.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / SettingsConfig +[@eslint-react/shared](../README.md) / SettingsConfig # Interface: SettingsConfig diff --git a/packages/utilities/kit/docs/type-aliases/RuleContext.md b/packages/shared/docs/type-aliases/RuleContext.md similarity index 78% rename from packages/utilities/kit/docs/type-aliases/RuleContext.md rename to packages/shared/docs/type-aliases/RuleContext.md index ea4c8841bc..6e4cad93a1 100644 --- a/packages/utilities/kit/docs/type-aliases/RuleContext.md +++ b/packages/shared/docs/type-aliases/RuleContext.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RuleContext +[@eslint-react/shared](../README.md) / RuleContext # Type Alias: RuleContext\ diff --git a/packages/utilities/kit/docs/type-aliases/RuleFeature.md b/packages/shared/docs/type-aliases/RuleFeature.md similarity index 61% rename from packages/utilities/kit/docs/type-aliases/RuleFeature.md rename to packages/shared/docs/type-aliases/RuleFeature.md index 0e51ed8a98..e48ee1953f 100644 --- a/packages/utilities/kit/docs/type-aliases/RuleFeature.md +++ b/packages/shared/docs/type-aliases/RuleFeature.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RuleFeature +[@eslint-react/shared](../README.md) / RuleFeature # Type Alias: RuleFeature diff --git a/packages/shared/docs/type-aliases/RulePolicy.md b/packages/shared/docs/type-aliases/RulePolicy.md new file mode 100644 index 0000000000..a409e26bd1 --- /dev/null +++ b/packages/shared/docs/type-aliases/RulePolicy.md @@ -0,0 +1,9 @@ +[**@eslint-react/shared**](../README.md) + +*** + +[@eslint-react/shared](../README.md) / RulePolicy + +# Type Alias: RulePolicy + +> **RulePolicy** = `number` diff --git a/packages/utilities/kit/docs/type-aliases/RuleSuggest.md b/packages/shared/docs/type-aliases/RuleSuggest.md similarity index 82% rename from packages/utilities/kit/docs/type-aliases/RuleSuggest.md rename to packages/shared/docs/type-aliases/RuleSuggest.md index bedf2d405c..64a4f8a137 100644 --- a/packages/utilities/kit/docs/type-aliases/RuleSuggest.md +++ b/packages/shared/docs/type-aliases/RuleSuggest.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RuleSuggest +[@eslint-react/shared](../README.md) / RuleSuggest # Type Alias: RuleSuggest\ diff --git a/packages/utilities/kit/docs/type-aliases/Severity.md b/packages/shared/docs/type-aliases/Severity.md similarity index 64% rename from packages/utilities/kit/docs/type-aliases/Severity.md rename to packages/shared/docs/type-aliases/Severity.md index a45486a616..cafcb10c90 100644 --- a/packages/utilities/kit/docs/type-aliases/Severity.md +++ b/packages/shared/docs/type-aliases/Severity.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / Severity +[@eslint-react/shared](../README.md) / Severity # Type Alias: Severity diff --git a/packages/utilities/kit/docs/type-aliases/SeverityLevel.md b/packages/shared/docs/type-aliases/SeverityLevel.md similarity index 64% rename from packages/utilities/kit/docs/type-aliases/SeverityLevel.md rename to packages/shared/docs/type-aliases/SeverityLevel.md index 15714c8018..fa2e727d03 100644 --- a/packages/utilities/kit/docs/type-aliases/SeverityLevel.md +++ b/packages/shared/docs/type-aliases/SeverityLevel.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / SeverityLevel +[@eslint-react/shared](../README.md) / SeverityLevel # Type Alias: SeverityLevel diff --git a/packages/utilities/kit/docs/type-aliases/SeverityName.md b/packages/shared/docs/type-aliases/SeverityName.md similarity index 56% rename from packages/utilities/kit/docs/type-aliases/SeverityName.md rename to packages/shared/docs/type-aliases/SeverityName.md index 699828cc5c..43bdd580cf 100644 --- a/packages/utilities/kit/docs/type-aliases/SeverityName.md +++ b/packages/shared/docs/type-aliases/SeverityName.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / SeverityName +[@eslint-react/shared](../README.md) / SeverityName # Type Alias: SeverityName diff --git a/packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX.md b/packages/shared/docs/variables/RE_ANNOTATION_JSX.md similarity index 69% rename from packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX.md rename to packages/shared/docs/variables/RE_ANNOTATION_JSX.md index 15b9ab2014..5e95c8b5ca 100644 --- a/packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX.md +++ b/packages/shared/docs/variables/RE_ANNOTATION_JSX.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_ANNOTATION\_JSX +[@eslint-react/shared](../README.md) / RE\_ANNOTATION\_JSX # Variable: RE\_ANNOTATION\_JSX diff --git a/packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX_FRAG.md b/packages/shared/docs/variables/RE_ANNOTATION_JSX_FRAG.md similarity index 69% rename from packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX_FRAG.md rename to packages/shared/docs/variables/RE_ANNOTATION_JSX_FRAG.md index 025f9f2b64..a8513c87e7 100644 --- a/packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX_FRAG.md +++ b/packages/shared/docs/variables/RE_ANNOTATION_JSX_FRAG.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_ANNOTATION\_JSX\_FRAG +[@eslint-react/shared](../README.md) / RE\_ANNOTATION\_JSX\_FRAG # Variable: RE\_ANNOTATION\_JSX\_FRAG diff --git a/packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX_IMPORT_SOURCE.md b/packages/shared/docs/variables/RE_ANNOTATION_JSX_IMPORT_SOURCE.md similarity index 70% rename from packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX_IMPORT_SOURCE.md rename to packages/shared/docs/variables/RE_ANNOTATION_JSX_IMPORT_SOURCE.md index b23b7838f3..373a18d892 100644 --- a/packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX_IMPORT_SOURCE.md +++ b/packages/shared/docs/variables/RE_ANNOTATION_JSX_IMPORT_SOURCE.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_ANNOTATION\_JSX\_IMPORT\_SOURCE +[@eslint-react/shared](../README.md) / RE\_ANNOTATION\_JSX\_IMPORT\_SOURCE # Variable: RE\_ANNOTATION\_JSX\_IMPORT\_SOURCE diff --git a/packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX_RUNTIME.md b/packages/shared/docs/variables/RE_ANNOTATION_JSX_RUNTIME.md similarity index 70% rename from packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX_RUNTIME.md rename to packages/shared/docs/variables/RE_ANNOTATION_JSX_RUNTIME.md index 0b4ef3932b..d66d03750b 100644 --- a/packages/utilities/kit/docs/variables/RE_ANNOTATION_JSX_RUNTIME.md +++ b/packages/shared/docs/variables/RE_ANNOTATION_JSX_RUNTIME.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_ANNOTATION\_JSX\_RUNTIME +[@eslint-react/shared](../README.md) / RE\_ANNOTATION\_JSX\_RUNTIME # Variable: RE\_ANNOTATION\_JSX\_RUNTIME diff --git a/packages/utilities/kit/docs/variables/RE_CAMEL_CASE.md b/packages/shared/docs/variables/RE_CAMEL_CASE.md similarity index 69% rename from packages/utilities/kit/docs/variables/RE_CAMEL_CASE.md rename to packages/shared/docs/variables/RE_CAMEL_CASE.md index cb3acf1729..98d23441ea 100644 --- a/packages/utilities/kit/docs/variables/RE_CAMEL_CASE.md +++ b/packages/shared/docs/variables/RE_CAMEL_CASE.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_CAMEL\_CASE +[@eslint-react/shared](../README.md) / RE\_CAMEL\_CASE # Variable: RE\_CAMEL\_CASE diff --git a/packages/utilities/kit/docs/variables/RE_COMPONENT_NAME.md b/packages/shared/docs/variables/RE_COMPONENT_NAME.md similarity index 69% rename from packages/utilities/kit/docs/variables/RE_COMPONENT_NAME.md rename to packages/shared/docs/variables/RE_COMPONENT_NAME.md index 778107b92c..9dcaa1cd80 100644 --- a/packages/utilities/kit/docs/variables/RE_COMPONENT_NAME.md +++ b/packages/shared/docs/variables/RE_COMPONENT_NAME.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_COMPONENT\_NAME +[@eslint-react/shared](../README.md) / RE\_COMPONENT\_NAME # Variable: RE\_COMPONENT\_NAME diff --git a/packages/utilities/kit/docs/variables/RE_COMPONENT_NAME_LOOSE.md b/packages/shared/docs/variables/RE_COMPONENT_NAME_LOOSE.md similarity index 69% rename from packages/utilities/kit/docs/variables/RE_COMPONENT_NAME_LOOSE.md rename to packages/shared/docs/variables/RE_COMPONENT_NAME_LOOSE.md index 4b9b2150fe..f2eb2c8910 100644 --- a/packages/utilities/kit/docs/variables/RE_COMPONENT_NAME_LOOSE.md +++ b/packages/shared/docs/variables/RE_COMPONENT_NAME_LOOSE.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_COMPONENT\_NAME\_LOOSE +[@eslint-react/shared](../README.md) / RE\_COMPONENT\_NAME\_LOOSE # Variable: RE\_COMPONENT\_NAME\_LOOSE diff --git a/packages/utilities/kit/docs/variables/RE_CONSTANT_CASE.md b/packages/shared/docs/variables/RE_CONSTANT_CASE.md similarity index 69% rename from packages/utilities/kit/docs/variables/RE_CONSTANT_CASE.md rename to packages/shared/docs/variables/RE_CONSTANT_CASE.md index 5b0c155286..584618ff7f 100644 --- a/packages/utilities/kit/docs/variables/RE_CONSTANT_CASE.md +++ b/packages/shared/docs/variables/RE_CONSTANT_CASE.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_CONSTANT\_CASE +[@eslint-react/shared](../README.md) / RE\_CONSTANT\_CASE # Variable: RE\_CONSTANT\_CASE diff --git a/packages/utilities/kit/docs/variables/RE_HOOK_NAME.md b/packages/shared/docs/variables/RE_HOOK_NAME.md similarity index 68% rename from packages/utilities/kit/docs/variables/RE_HOOK_NAME.md rename to packages/shared/docs/variables/RE_HOOK_NAME.md index d930fbcfa3..b69d8de525 100644 --- a/packages/utilities/kit/docs/variables/RE_HOOK_NAME.md +++ b/packages/shared/docs/variables/RE_HOOK_NAME.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_HOOK\_NAME +[@eslint-react/shared](../README.md) / RE\_HOOK\_NAME # Variable: RE\_HOOK\_NAME diff --git a/packages/utilities/kit/docs/variables/RE_HTML_TAG.md b/packages/shared/docs/variables/RE_HTML_TAG.md similarity index 68% rename from packages/utilities/kit/docs/variables/RE_HTML_TAG.md rename to packages/shared/docs/variables/RE_HTML_TAG.md index bc5e09121c..ae667fd0c6 100644 --- a/packages/utilities/kit/docs/variables/RE_HTML_TAG.md +++ b/packages/shared/docs/variables/RE_HTML_TAG.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_HTML\_TAG +[@eslint-react/shared](../README.md) / RE\_HTML\_TAG # Variable: RE\_HTML\_TAG diff --git a/packages/utilities/kit/docs/variables/RE_JAVASCRIPT_PROTOCOL.md b/packages/shared/docs/variables/RE_JAVASCRIPT_PROTOCOL.md similarity index 63% rename from packages/utilities/kit/docs/variables/RE_JAVASCRIPT_PROTOCOL.md rename to packages/shared/docs/variables/RE_JAVASCRIPT_PROTOCOL.md index 002bf1c166..9ae7f9bcb0 100644 --- a/packages/utilities/kit/docs/variables/RE_JAVASCRIPT_PROTOCOL.md +++ b/packages/shared/docs/variables/RE_JAVASCRIPT_PROTOCOL.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_JAVASCRIPT\_PROTOCOL +[@eslint-react/shared](../README.md) / RE\_JAVASCRIPT\_PROTOCOL # Variable: RE\_JAVASCRIPT\_PROTOCOL diff --git a/packages/utilities/kit/docs/variables/RE_JS_EXT.md b/packages/shared/docs/variables/RE_JS_EXT.md similarity index 70% rename from packages/utilities/kit/docs/variables/RE_JS_EXT.md rename to packages/shared/docs/variables/RE_JS_EXT.md index 6c317f66e3..2eb0074f2e 100644 --- a/packages/utilities/kit/docs/variables/RE_JS_EXT.md +++ b/packages/shared/docs/variables/RE_JS_EXT.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_JS\_EXT +[@eslint-react/shared](../README.md) / RE\_JS\_EXT # Variable: RE\_JS\_EXT diff --git a/packages/utilities/kit/docs/variables/RE_JS_IDENTIFIER.md b/packages/shared/docs/variables/RE_JS_IDENTIFIER.md similarity index 70% rename from packages/utilities/kit/docs/variables/RE_JS_IDENTIFIER.md rename to packages/shared/docs/variables/RE_JS_IDENTIFIER.md index d1a918a72d..3ade7f41b0 100644 --- a/packages/utilities/kit/docs/variables/RE_JS_IDENTIFIER.md +++ b/packages/shared/docs/variables/RE_JS_IDENTIFIER.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_JS\_IDENTIFIER +[@eslint-react/shared](../README.md) / RE\_JS\_IDENTIFIER # Variable: RE\_JS\_IDENTIFIER diff --git a/packages/utilities/kit/docs/variables/RE_KEBAB_CASE.md b/packages/shared/docs/variables/RE_KEBAB_CASE.md similarity index 69% rename from packages/utilities/kit/docs/variables/RE_KEBAB_CASE.md rename to packages/shared/docs/variables/RE_KEBAB_CASE.md index 8d38a52b46..cb43a8a29a 100644 --- a/packages/utilities/kit/docs/variables/RE_KEBAB_CASE.md +++ b/packages/shared/docs/variables/RE_KEBAB_CASE.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_KEBAB\_CASE +[@eslint-react/shared](../README.md) / RE\_KEBAB\_CASE # Variable: RE\_KEBAB\_CASE diff --git a/packages/utilities/kit/docs/variables/RE_PASCAL_CASE.md b/packages/shared/docs/variables/RE_PASCAL_CASE.md similarity index 69% rename from packages/utilities/kit/docs/variables/RE_PASCAL_CASE.md rename to packages/shared/docs/variables/RE_PASCAL_CASE.md index 5cd6b3dfa3..a6b7ce9bed 100644 --- a/packages/utilities/kit/docs/variables/RE_PASCAL_CASE.md +++ b/packages/shared/docs/variables/RE_PASCAL_CASE.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_PASCAL\_CASE +[@eslint-react/shared](../README.md) / RE\_PASCAL\_CASE # Variable: RE\_PASCAL\_CASE diff --git a/packages/utilities/kit/docs/variables/RE_REGEXP_STR.md b/packages/shared/docs/variables/RE_REGEXP_STR.md similarity index 68% rename from packages/utilities/kit/docs/variables/RE_REGEXP_STR.md rename to packages/shared/docs/variables/RE_REGEXP_STR.md index 566f76236c..e7ea34e25f 100644 --- a/packages/utilities/kit/docs/variables/RE_REGEXP_STR.md +++ b/packages/shared/docs/variables/RE_REGEXP_STR.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_REGEXP\_STR +[@eslint-react/shared](../README.md) / RE\_REGEXP\_STR # Variable: RE\_REGEXP\_STR diff --git a/packages/utilities/kit/docs/variables/RE_SNAKE_CASE.md b/packages/shared/docs/variables/RE_SNAKE_CASE.md similarity index 69% rename from packages/utilities/kit/docs/variables/RE_SNAKE_CASE.md rename to packages/shared/docs/variables/RE_SNAKE_CASE.md index 9091c48f20..26d46ded9c 100644 --- a/packages/utilities/kit/docs/variables/RE_SNAKE_CASE.md +++ b/packages/shared/docs/variables/RE_SNAKE_CASE.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_SNAKE\_CASE +[@eslint-react/shared](../README.md) / RE\_SNAKE\_CASE # Variable: RE\_SNAKE\_CASE diff --git a/packages/utilities/kit/docs/variables/RE_TS_EXT.md b/packages/shared/docs/variables/RE_TS_EXT.md similarity index 70% rename from packages/utilities/kit/docs/variables/RE_TS_EXT.md rename to packages/shared/docs/variables/RE_TS_EXT.md index ea61b2074b..cea36b639d 100644 --- a/packages/utilities/kit/docs/variables/RE_TS_EXT.md +++ b/packages/shared/docs/variables/RE_TS_EXT.md @@ -1,8 +1,8 @@ -[**@eslint-react/kit**](../README.md) +[**@eslint-react/shared**](../README.md) *** -[@eslint-react/kit](../README.md) / RE\_TS\_EXT +[@eslint-react/shared](../README.md) / RE\_TS\_EXT # Variable: RE\_TS\_EXT diff --git a/packages/shared/package.json b/packages/shared/package.json index 48b3561490..967108180f 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -35,7 +35,6 @@ }, "dependencies": { "@eslint-react/eff": "workspace:*", - "@eslint-react/kit": "workspace:*", "@typescript-eslint/utils": "^8.46.0", "ts-pattern": "^5.8.0", "zod": "^4.1.12" diff --git a/packages/shared/src/constants.ts b/packages/shared/src/constants.ts index 4bc2a93289..6946993038 100644 --- a/packages/shared/src/constants.ts +++ b/packages/shared/src/constants.ts @@ -16,3 +16,97 @@ export const GITHUB_URL = "https://github.com/Rel1cx/eslint-react"; export const WEBSITE_URL = "https://eslint-react.xyz"; // #endregion + +// #region RegExp + +/** + * Regular expressions for matching a HTML tag name + */ +export const RE_HTML_TAG = /^[a-z][^-]*$/u; + +/** + * Regular expression for matching a TypeScript file extension. + */ +export const RE_TS_EXT = /^[cm]?tsx?$/u; + +/** + * Regular expression for matching a JavaScript file extension. + */ +export const RE_JS_EXT = /^[cm]?jsx?$/u; + +/** + * Regular expression for matching a PascalCase string. + */ +export const RE_PASCAL_CASE = /^[A-Z][\dA-Za-z]*$/u; + +/** + * Regular expression for matching a camelCase string. + */ +export const RE_CAMEL_CASE = /^[a-z][\dA-Za-z]*$/u; + +/** + * Regular expression for matching a kebab-case string. + */ +export const RE_KEBAB_CASE = /^[a-z][\d\-a-z]*$/u; + +/** + * Regular expression for matching a snake_case string. + */ +export const RE_SNAKE_CASE = /^[a-z][\d_a-z]*$/u; + +/** + * Regular expression for matching a CONSTANT_CASE string. + */ +export const RE_CONSTANT_CASE = /^[A-Z][\d_A-Z]*$/u; + +// @see https://github.com/facebook/react/blob/6db7f4209e6f32ebde298a0b7451710dd6aa3e19/packages/react-dom-bindings/src/shared/sanitizeURL.js#L22 +// dprint-ignore +// eslint-disable-next-line no-control-regex +export const RE_JAVASCRIPT_PROTOCOL = /^[\u0000-\u001F ]*j[\t\n\r]*a[\t\n\r]*v[\t\n\r]*a[\t\n\r]*s[\t\n\r]*c[\t\n\r]*r[\t\n\r]*i[\t\n\r]*p[\t\n\r]*t[\t\n\r]*:/iu; + +/** + * Regular expression for matching a valid JavaScript identifier. + */ +export const RE_JS_IDENTIFIER = /^[_$a-z][\w$]*$/i; + +/** + * Regular expression for matching a RegExp string. + */ +export const RE_REGEXP_STR = /^\/(.+)\/([A-Za-z]*)$/u; + +/** + * Regular expression for matching a `@jsx` annotation comment. + */ +export const RE_ANNOTATION_JSX = /@jsx\s+(\S+)/u; + +/** + * Regular expression for matching a `@jsxFrag` annotation comment. + */ +export const RE_ANNOTATION_JSX_FRAG = /@jsxFrag\s+(\S+)/u; + +/** + * Regular expression for matching a `@jsxRuntime` annotation comment. + */ +export const RE_ANNOTATION_JSX_RUNTIME = /@jsxRuntime\s+(\S+)/u; + +/** + * Regular expression for matching a `@jsxImportSource` annotation comment. + */ +export const RE_ANNOTATION_JSX_IMPORT_SOURCE = /@jsxImportSource\s+(\S+)/u; + +/** + * Regular expression for matching a React component name. + */ +export const RE_COMPONENT_NAME = /^[A-Z]/u; + +/** + * Regular expression for matching a React component name (loose). + */ +export const RE_COMPONENT_NAME_LOOSE = /^_?[A-Z]/u; + +/** + * Regular expression for matching a React Hook name. + */ +export const RE_HOOK_NAME = /^use/u; + +// #endregion diff --git a/packages/shared/src/get-config-adapters.ts b/packages/shared/src/get-config-adapters.ts index 0208a0c343..b88160a956 100644 --- a/packages/shared/src/get-config-adapters.ts +++ b/packages/shared/src/get-config-adapters.ts @@ -1,4 +1,4 @@ -import type { CompatibleConfig, CompatiblePlugin } from "@eslint-react/kit"; +import type { CompatibleConfig, CompatiblePlugin } from "./types"; export function getConfigAdapters(pluginName: string, plugin: CompatiblePlugin) { function toFlatConfig(config: CompatibleConfig) { diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index abfeefd3a2..632aa70f2e 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -4,4 +4,7 @@ export * from "./constants"; export * from "./get-config-adapters"; export * from "./get-doc-url"; export * from "./get-react-version"; +export * from "./regexp"; +export * from "./report"; export * from "./settings"; +export type * from "./types"; diff --git a/packages/utilities/kit/src/utils/regexp.ts b/packages/shared/src/regexp.ts similarity index 94% rename from packages/utilities/kit/src/utils/regexp.ts rename to packages/shared/src/regexp.ts index 5351970cd2..42a8482408 100644 --- a/packages/utilities/kit/src/utils/regexp.ts +++ b/packages/shared/src/regexp.ts @@ -1,4 +1,4 @@ -import { RE_REGEXP_STR } from "../constants"; +import { RE_REGEXP_STR } from "./constants"; /** * Convert a string to the `RegExp`. diff --git a/packages/utilities/kit/src/utils/reporting.ts b/packages/shared/src/report.ts similarity index 56% rename from packages/utilities/kit/src/utils/reporting.ts rename to packages/shared/src/report.ts index 8ad602fa4d..8b1b2795d8 100644 --- a/packages/utilities/kit/src/utils/reporting.ts +++ b/packages/shared/src/report.ts @@ -1,9 +1,8 @@ -import { type unit } from "@eslint-react/eff"; import type { ReportDescriptor } from "@typescript-eslint/utils/ts-eslint"; -import type { RuleContext } from "../types"; +import type { RuleContext } from "./types"; export function report(context: RuleContext) { - return (descriptor: unit | null | ReportDescriptor) => { + return (descriptor?: null | ReportDescriptor) => { if (descriptor == null) return; return context.report(descriptor); }; diff --git a/packages/shared/src/settings.ts b/packages/shared/src/settings.ts index bf41f99209..785f1aa505 100644 --- a/packages/shared/src/settings.ts +++ b/packages/shared/src/settings.ts @@ -2,7 +2,6 @@ /* eslint-disable perfectionist/sort-objects */ import type { unit } from "@eslint-react/eff"; import { getOrElseUpdate, identity } from "@eslint-react/eff"; -import { type RuleContext } from "@eslint-react/kit"; import type { ESLint, SharedConfigurationSettings } from "@typescript-eslint/utils/ts-eslint"; // eslint-disable-line @typescript-eslint/no-unused-vars import type { PartialDeep } from "type-fest"; @@ -10,6 +9,7 @@ import { P, match } from "ts-pattern"; import { z } from "zod/v4"; import { getReactVersion } from "./get-react-version"; +import type { RuleContext } from "./types"; // ===== Schema Definitions ===== diff --git a/packages/utilities/kit/src/types/index.ts b/packages/shared/src/types.ts similarity index 100% rename from packages/utilities/kit/src/types/index.ts rename to packages/shared/src/types.ts diff --git a/packages/utilities/kit/docs/README.md b/packages/utilities/kit/docs/README.md deleted file mode 100644 index 5114058013..0000000000 --- a/packages/utilities/kit/docs/README.md +++ /dev/null @@ -1,49 +0,0 @@ -**@eslint-react/kit** - -*** - -# @eslint-react/kit - -## Interfaces - -- [CompatibleConfig](interfaces/CompatibleConfig.md) -- [CompatiblePlugin](interfaces/CompatiblePlugin.md) -- [CompatibleRule](interfaces/CompatibleRule.md) -- [SettingsConfig](interfaces/SettingsConfig.md) - -## Type Aliases - -- [RuleContext](type-aliases/RuleContext.md) -- [RuleFeature](type-aliases/RuleFeature.md) -- [RulePolicy](type-aliases/RulePolicy.md) -- [RuleSuggest](type-aliases/RuleSuggest.md) -- [Severity](type-aliases/Severity.md) -- [SeverityLevel](type-aliases/SeverityLevel.md) -- [SeverityName](type-aliases/SeverityName.md) - -## Variables - -- [RE\_ANNOTATION\_JSX](variables/RE_ANNOTATION_JSX.md) -- [RE\_ANNOTATION\_JSX\_FRAG](variables/RE_ANNOTATION_JSX_FRAG.md) -- [RE\_ANNOTATION\_JSX\_IMPORT\_SOURCE](variables/RE_ANNOTATION_JSX_IMPORT_SOURCE.md) -- [RE\_ANNOTATION\_JSX\_RUNTIME](variables/RE_ANNOTATION_JSX_RUNTIME.md) -- [RE\_CAMEL\_CASE](variables/RE_CAMEL_CASE.md) -- [RE\_COMPONENT\_NAME](variables/RE_COMPONENT_NAME.md) -- [RE\_COMPONENT\_NAME\_LOOSE](variables/RE_COMPONENT_NAME_LOOSE.md) -- [RE\_CONSTANT\_CASE](variables/RE_CONSTANT_CASE.md) -- [RE\_HOOK\_NAME](variables/RE_HOOK_NAME.md) -- [RE\_HTML\_TAG](variables/RE_HTML_TAG.md) -- [RE\_JAVASCRIPT\_PROTOCOL](variables/RE_JAVASCRIPT_PROTOCOL.md) -- [RE\_JS\_EXT](variables/RE_JS_EXT.md) -- [RE\_JS\_IDENTIFIER](variables/RE_JS_IDENTIFIER.md) -- [RE\_KEBAB\_CASE](variables/RE_KEBAB_CASE.md) -- [RE\_PASCAL\_CASE](variables/RE_PASCAL_CASE.md) -- [RE\_REGEXP\_STR](variables/RE_REGEXP_STR.md) -- [RE\_SNAKE\_CASE](variables/RE_SNAKE_CASE.md) -- [RE\_TS\_EXT](variables/RE_TS_EXT.md) - -## Functions - -- [isRegExp](functions/isRegExp.md) -- [report](functions/report.md) -- [toRegExp](functions/toRegExp.md) diff --git a/packages/utilities/kit/docs/functions/report.md b/packages/utilities/kit/docs/functions/report.md deleted file mode 100644 index 4d06ab8323..0000000000 --- a/packages/utilities/kit/docs/functions/report.md +++ /dev/null @@ -1,29 +0,0 @@ -[**@eslint-react/kit**](../README.md) - -*** - -[@eslint-react/kit](../README.md) / report - -# Function: report() - -> **report**(`context`): (`descriptor`) => `void` - -## Parameters - -### context - -[`RuleContext`](../type-aliases/RuleContext.md) - -## Returns - -> (`descriptor`): `void` - -### Parameters - -#### descriptor - -`ReportDescriptor`\<`string`\> | `null` | `undefined` - -### Returns - -`void` diff --git a/packages/utilities/kit/docs/type-aliases/RulePolicy.md b/packages/utilities/kit/docs/type-aliases/RulePolicy.md deleted file mode 100644 index d82c6e5199..0000000000 --- a/packages/utilities/kit/docs/type-aliases/RulePolicy.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../README.md) - -*** - -[@eslint-react/kit](../README.md) / RulePolicy - -# Type Alias: RulePolicy - -> **RulePolicy** = `number` diff --git a/packages/utilities/kit/package.json b/packages/utilities/kit/package.json deleted file mode 100644 index 0b1cb04517..0000000000 --- a/packages/utilities/kit/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "@eslint-react/kit", - "version": "2.1.2-next.2", - "description": "ESLint React's plugin kit for building plugins and rules.", - "homepage": "https://github.com/Rel1cx/eslint-react", - "bugs": { - "url": "https://github.com/Rel1cx/eslint-react/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Rel1cx/eslint-react.git", - "directory": "packages/utilities/kit" - }, - "license": "MIT", - "author": "Rel1cx", - "sideEffects": false, - "type": "module", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js" - }, - "./package.json": "./package.json" - }, - "files": [ - "dist", - "./package.json" - ], - "scripts": { - "build": "tsdown --dts-resolve", - "build:docs": "typedoc", - "lint:publish": "publint", - "lint:ts": "tsc --noEmit", - "publish": "pnpm run build && pnpm run lint:publish" - }, - "dependencies": { - "@eslint-react/eff": "workspace:*", - "@typescript-eslint/utils": "^8.46.0" - }, - "devDependencies": { - "@local/configs": "workspace:*", - "@tsconfig/node22": "^22.0.2", - "tsdown": "^0.15.6" - }, - "engines": { - "node": ">=20.19.0" - } -} diff --git a/packages/utilities/kit/src/constants.ts b/packages/utilities/kit/src/constants.ts deleted file mode 100644 index 7dfc3e9754..0000000000 --- a/packages/utilities/kit/src/constants.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Regular expressions for matching a HTML tag name - */ -export const RE_HTML_TAG = /^[a-z][^-]*$/u; - -/** - * Regular expression for matching a TypeScript file extension. - */ -export const RE_TS_EXT = /^[cm]?tsx?$/u; - -/** - * Regular expression for matching a JavaScript file extension. - */ -export const RE_JS_EXT = /^[cm]?jsx?$/u; - -/** - * Regular expression for matching a PascalCase string. - */ -export const RE_PASCAL_CASE = /^[A-Z][\dA-Za-z]*$/u; - -/** - * Regular expression for matching a camelCase string. - */ -export const RE_CAMEL_CASE = /^[a-z][\dA-Za-z]*$/u; - -/** - * Regular expression for matching a kebab-case string. - */ -export const RE_KEBAB_CASE = /^[a-z][\d\-a-z]*$/u; - -/** - * Regular expression for matching a snake_case string. - */ -export const RE_SNAKE_CASE = /^[a-z][\d_a-z]*$/u; - -/** - * Regular expression for matching a CONSTANT_CASE string. - */ -export const RE_CONSTANT_CASE = /^[A-Z][\d_A-Z]*$/u; - -// @see https://github.com/facebook/react/blob/6db7f4209e6f32ebde298a0b7451710dd6aa3e19/packages/react-dom-bindings/src/shared/sanitizeURL.js#L22 -// dprint-ignore -// eslint-disable-next-line no-control-regex -export const RE_JAVASCRIPT_PROTOCOL = /^[\u0000-\u001F ]*j[\t\n\r]*a[\t\n\r]*v[\t\n\r]*a[\t\n\r]*s[\t\n\r]*c[\t\n\r]*r[\t\n\r]*i[\t\n\r]*p[\t\n\r]*t[\t\n\r]*:/iu; - -/** - * Regular expression for matching a valid JavaScript identifier. - */ -export const RE_JS_IDENTIFIER = /^[_$a-z][\w$]*$/i; - -/** - * Regular expression for matching a RegExp string. - */ -export const RE_REGEXP_STR = /^\/(.+)\/([A-Za-z]*)$/u; - -/** - * Regular expression for matching a `@jsx` annotation comment. - */ -export const RE_ANNOTATION_JSX = /@jsx\s+(\S+)/u; - -/** - * Regular expression for matching a `@jsxFrag` annotation comment. - */ -export const RE_ANNOTATION_JSX_FRAG = /@jsxFrag\s+(\S+)/u; - -/** - * Regular expression for matching a `@jsxRuntime` annotation comment. - */ -export const RE_ANNOTATION_JSX_RUNTIME = /@jsxRuntime\s+(\S+)/u; - -/** - * Regular expression for matching a `@jsxImportSource` annotation comment. - */ -export const RE_ANNOTATION_JSX_IMPORT_SOURCE = /@jsxImportSource\s+(\S+)/u; - -/** - * Regular expression for matching a React component name. - */ -export const RE_COMPONENT_NAME = /^[A-Z]/u; - -/** - * Regular expression for matching a React component name (loose). - */ -export const RE_COMPONENT_NAME_LOOSE = /^_?[A-Z]/u; - -/** - * Regular expression for matching a React Hook name. - */ -export const RE_HOOK_NAME = /^use/u; diff --git a/packages/utilities/kit/src/index.ts b/packages/utilities/kit/src/index.ts deleted file mode 100644 index d4a2d87f22..0000000000 --- a/packages/utilities/kit/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./constants"; -export type * from "./types"; -export * from "./utils"; diff --git a/packages/utilities/kit/src/utils/index.ts b/packages/utilities/kit/src/utils/index.ts deleted file mode 100644 index a918fcd891..0000000000 --- a/packages/utilities/kit/src/utils/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./regexp"; -export * from "./reporting"; diff --git a/packages/utilities/kit/tsconfig.json b/packages/utilities/kit/tsconfig.json deleted file mode 100644 index 8ce1a35fcd..0000000000 --- a/packages/utilities/kit/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "extends": [ - "@local/configs/tsconfig.base.json", - "@tsconfig/node22/tsconfig.json" - ], - "compilerOptions": { - "module": "ESNext", - "moduleResolution": "bundler", - "skipLibCheck": true, - "moduleDetection": "force", - "isolatedModules": true, - "verbatimModuleSyntax": true, - "resolveJsonModule": true, - "allowJs": false, - "checkJs": false, - "strict": true, - "erasableSyntaxOnly": true, - "noImplicitAny": true, - "noImplicitThis": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "exactOptionalPropertyTypes": true, - "composite": false, - "stripInternal": false - }, - "exclude": [ - "node_modules", - "**/dist", - "test/fixtures" - ], - "include": [ - "src" - ] -} diff --git a/packages/utilities/kit/tsdown.config.ts b/packages/utilities/kit/tsdown.config.ts deleted file mode 100644 index ab2056e62f..0000000000 --- a/packages/utilities/kit/tsdown.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Options } from "tsdown"; - -export default { - clean: true, - dts: true, - entry: ["src/index.ts"], - external: ["eslint", "typescript"], - format: ["esm"], - minify: false, - outDir: "dist", - platform: "neutral", - sourcemap: false, - target: "node20", - treeshake: true, -} satisfies Options; diff --git a/packages/utilities/kit/typedoc.json b/packages/utilities/kit/typedoc.json deleted file mode 100644 index 0cc228b86d..0000000000 --- a/packages/utilities/kit/typedoc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "@local/configs/typedoc.base.json" - ], - "name": "@eslint-react/kit", - "entryPoints": [ - "src/index.ts" - ], - "out": "docs" -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 342672b297..bb52758cac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -194,9 +194,6 @@ importers: '@eslint-react/eff': specifier: workspace:* version: link:../../packages/utilities/eff - '@eslint-react/kit': - specifier: workspace:* - version: link:../../packages/utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../../packages/shared @@ -325,9 +322,6 @@ importers: '@eslint-react/eslint-plugin': specifier: workspace:* version: link:../../packages/plugins/eslint-plugin - '@eslint-react/kit': - specifier: workspace:* - version: link:../../packages/utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../../packages/shared @@ -648,9 +642,6 @@ importers: '@eslint-react/eslint-plugin': specifier: workspace:* version: link:../../packages/plugins/eslint-plugin - '@eslint-react/kit': - specifier: workspace:* - version: link:../../packages/utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../../packages/shared @@ -711,9 +702,6 @@ importers: '@eslint-react/eff': specifier: workspace:* version: link:../utilities/eff - '@eslint-react/kit': - specifier: workspace:* - version: link:../utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../shared @@ -748,9 +736,6 @@ importers: '@eslint-react/eff': specifier: workspace:* version: link:../../utilities/eff - '@eslint-react/kit': - specifier: workspace:* - version: link:../../utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../../shared @@ -812,9 +797,6 @@ importers: '@eslint-react/eff': specifier: workspace:* version: link:../../utilities/eff - '@eslint-react/kit': - specifier: workspace:* - version: link:../../utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../../shared @@ -870,9 +852,6 @@ importers: '@eslint-react/eff': specifier: workspace:* version: link:../../utilities/eff - '@eslint-react/kit': - specifier: workspace:* - version: link:../../utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../../shared @@ -928,9 +907,6 @@ importers: '@eslint-react/eff': specifier: workspace:* version: link:../../utilities/eff - '@eslint-react/kit': - specifier: workspace:* - version: link:../../utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../../shared @@ -986,9 +962,6 @@ importers: '@eslint-react/eff': specifier: workspace:* version: link:../../utilities/eff - '@eslint-react/kit': - specifier: workspace:* - version: link:../../utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../../shared @@ -1044,9 +1017,6 @@ importers: '@eslint-react/eff': specifier: workspace:* version: link:../../utilities/eff - '@eslint-react/kit': - specifier: workspace:* - version: link:../../utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../../shared @@ -1099,9 +1069,6 @@ importers: '@eslint-react/eff': specifier: workspace:* version: link:../../utilities/eff - '@eslint-react/kit': - specifier: workspace:* - version: link:../../utilities/kit '@eslint-react/shared': specifier: workspace:* version: link:../../shared @@ -1160,9 +1127,6 @@ importers: '@eslint-react/eff': specifier: workspace:* version: link:../utilities/eff - '@eslint-react/kit': - specifier: workspace:* - version: link:../utilities/kit '@typescript-eslint/utils': specifier: ^8.46.0 version: 8.46.0(eslint@9.37.0(jiti@2.6.1))(typescript@5.9.3) @@ -1223,25 +1187,6 @@ importers: specifier: ^0.15.6 version: 0.15.6(publint@0.3.14)(typescript@5.9.3) - packages/utilities/kit: - dependencies: - '@eslint-react/eff': - specifier: workspace:* - version: link:../eff - '@typescript-eslint/utils': - specifier: ^8.46.0 - version: 8.46.0(eslint@9.37.0(jiti@2.6.1))(typescript@5.9.3) - devDependencies: - '@local/configs': - specifier: workspace:* - version: link:../../../.pkgs/configs - '@tsconfig/node22': - specifier: ^22.0.2 - version: 22.0.2 - tsdown: - specifier: ^0.15.6 - version: 0.15.6(publint@0.3.14)(typescript@5.9.3) - packages/utilities/var: dependencies: '@eslint-react/ast':