Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions apps/website/content/docs/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ flowchart TB
subgraph "Utilities Modules"
AST["AST Module"]:::utilities
Eff["Eff Module"]:::utilities
JSX["JSX Module"]:::utilities
Kit["Kit Module"]:::utilities
Var["Var Module"]:::utilities
end
Expand Down Expand Up @@ -69,13 +68,11 @@ flowchart TB
%% Utilities used by Core and Plugins
AST ---|"provides"| Core
Eff ---|"provides"| Core
JSX ---|"provides"| Core
Kit ---|"provides"| Core
Var ---|"provides"| Core

AST ---|"provides"| ReactX
Eff ---|"provides"| ReactX
JSX ---|"provides"| ReactX
Kit ---|"provides"| ReactX
Var ---|"provides"| ReactX

Expand All @@ -95,7 +92,6 @@ flowchart TB
Scripts -->|"CI/CD"| Shared
Scripts -->|"CI/CD"| AST
Scripts -->|"CI/CD"| Eff
Scripts -->|"CI/CD"| JSX
Scripts -->|"CI/CD"| Kit
Scripts -->|"CI/CD"| Var
Scripts -->|"CI/CD"| ReactX
Expand All @@ -113,7 +109,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 JSX "https://github.com/rel1cx/eslint-react/tree/main/packages/utilities/jsx"
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"
Expand Down Expand Up @@ -148,7 +143,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/jsx`: TSESTree AST utility module for static analysis of JSX
- `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
Expand Down
1 change: 0 additions & 1 deletion apps/website/content/docs/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Currently, it includes the following:
- `@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/jsx`: TSESTree AST utility module for static analysis of JSX.
- `@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.
Expand Down
19 changes: 19 additions & 0 deletions packages/core/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@
- [ComponentStateKind](type-aliases/ComponentStateKind.md)
- [EffectKind](type-aliases/EffectKind.md)
- [HookKind](type-aliases/HookKind.md)
- [JSXDetectionHint](type-aliases/JSXDetectionHint.md)
- [TSESTreeJSX](type-aliases/TSESTreeJSX.md)

## Variables

- [ComponentDetectionHint](variables/ComponentDetectionHint.md)
- [ComponentFlag](variables/ComponentFlag.md)
- [ComponentPhaseRelevance](variables/ComponentPhaseRelevance.md)
- [DEFAULT\_COMPONENT\_DETECTION\_HINT](variables/DEFAULT_COMPONENT_DETECTION_HINT.md)
- [DEFAULT\_JSX\_DETECTION\_HINT](variables/DEFAULT_JSX_DETECTION_HINT.md)
- [isCaptureOwnerStack](variables/isCaptureOwnerStack.md)
- [isCaptureOwnerStackCall](variables/isCaptureOwnerStackCall.md)
- [isChildrenCount](variables/isChildrenCount.md)
Expand All @@ -60,6 +63,7 @@
- [isForwardRef](variables/isForwardRef.md)
- [isForwardRefCall](variables/isForwardRefCall.md)
- [isInversePhase](variables/isInversePhase.md)
- [isJSX](variables/isJSX.md)
- [isLazy](variables/isLazy.md)
- [isLazyCall](variables/isLazyCall.md)
- [isMemo](variables/isMemo.md)
Expand All @@ -83,12 +87,21 @@
- [isUseStateCall](variables/isUseStateCall.md)
- [isUseSyncExternalStoreCall](variables/isUseSyncExternalStoreCall.md)
- [isUseTransitionCall](variables/isUseTransitionCall.md)
- [JSXDetectionHint](variables/JSXDetectionHint.md)

## Functions

- [findParentAttribute](functions/findParentAttribute.md)
- [getAttribute](functions/getAttribute.md)
- [getAttributeName](functions/getAttributeName.md)
- [getAttributeValue](functions/getAttributeValue.md)
- [getComponentFlagFromInitPath](functions/getComponentFlagFromInitPath.md)
- [getComponentNameFromId](functions/getComponentNameFromId.md)
- [getElementType](functions/getElementType.md)
- [getFunctionComponentId](functions/getFunctionComponentId.md)
- [hasAnyAttribute](functions/hasAnyAttribute.md)
- [hasAttribute](functions/hasAttribute.md)
- [hasEveryAttribute](functions/hasEveryAttribute.md)
- [hasNoneOrLooseComponentName](functions/hasNoneOrLooseComponentName.md)
- [isAssignmentToThisState](functions/isAssignmentToThisState.md)
- [isChildrenOfCreateElement](functions/isChildrenOfCreateElement.md)
Expand All @@ -105,6 +118,7 @@
- [isComponentWrapperCall](functions/isComponentWrapperCall.md)
- [isComponentWrapperCallLoose](functions/isComponentWrapperCallLoose.md)
- [isDeclaredInRenderPropLoose](functions/isDeclaredInRenderPropLoose.md)
- [isFragmentElement](functions/isFragmentElement.md)
- [isFunctionOfComponentDidMount](functions/isFunctionOfComponentDidMount.md)
- [isFunctionOfComponentWillUnmount](functions/isFunctionOfComponentWillUnmount.md)
- [isFunctionOfRender](functions/isFunctionOfRender.md)
Expand All @@ -117,8 +131,12 @@
- [isGetDerivedStateFromProps](functions/isGetDerivedStateFromProps.md)
- [isGetInitialState](functions/isGetInitialState.md)
- [isGetSnapshotBeforeUpdate](functions/isGetSnapshotBeforeUpdate.md)
- [isHostElement](functions/isHostElement.md)
- [isInitializedFromReact](functions/isInitializedFromReact.md)
- [isInsideRenderMethod](functions/isInsideRenderMethod.md)
- [isJsxLike](functions/isJsxLike.md)
- [isJsxText](functions/isJsxText.md)
- [isKeyedElement](functions/isKeyedElement.md)
- [isPureComponent](functions/isPureComponent.md)
- [isReactAPI](functions/isReactAPI.md)
- [isReactAPICall](functions/isReactAPICall.md)
Expand All @@ -139,6 +157,7 @@
- [isUnsafeComponentWillUpdate](functions/isUnsafeComponentWillUpdate.md)
- [isUseEffectCallLoose](functions/isUseEffectCallLoose.md)
- [isValidComponentDefinition](functions/isValidComponentDefinition.md)
- [stringifyJsx](functions/stringifyJsx.md)
- [useComponentCollector](functions/useComponentCollector.md)
- [useComponentCollectorLegacy](functions/useComponentCollectorLegacy.md)
- [useHookCollector](functions/useHookCollector.md)
31 changes: 31 additions & 0 deletions packages/core/docs/functions/findParentAttribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[**@eslint-react/core**](../README.md)

***

[@eslint-react/core](../README.md) / findParentAttribute

# Function: findParentAttribute()

> **findParentAttribute**(`node`, `test`): `undefined` \| `JSXAttribute`
Find the parent JSX attribute node of a node

## Parameters

### node

`Node`

The node to find the parent attribute of

### test

(`node`) => `boolean`

The test to apply to the parent attribute

## Returns

`undefined` \| `JSXAttribute`

The parent attribute node or undefined
43 changes: 43 additions & 0 deletions packages/core/docs/functions/getAttribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[**@eslint-react/core**](../README.md)

***

[@eslint-react/core](../README.md) / getAttribute

# Function: getAttribute()

> **getAttribute**(`context`, `name`, `attributes`, `initialScope?`): `undefined` \| `JSXAttribute` \| `JSXSpreadAttribute`
Get the JSX attribute node with the given name

## Parameters

### context

`RuleContext`

The ESLint rule context

### name

`string`

The name of the attribute

### attributes

(`JSXAttribute` \| `JSXSpreadAttribute`)[]

The attributes to search

### initialScope?

`Scope`

The initial scope to use for variable resolution

## Returns

`undefined` \| `JSXAttribute` \| `JSXSpreadAttribute`

The JSX attribute node or undefined
31 changes: 31 additions & 0 deletions packages/core/docs/functions/getAttributeName.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[**@eslint-react/core**](../README.md)

***

[@eslint-react/core](../README.md) / getAttributeName

# Function: getAttributeName()

> **getAttributeName**(`context`, `node`): `string`

Get the stringified name of a JSX attribute

## Parameters

### context

`RuleContext`

The ESLint rule context

### node

`JSXAttribute`

The JSX attribute node

## Returns

`string`

The name of the attribute
37 changes: 37 additions & 0 deletions packages/core/docs/functions/getAttributeValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[**@eslint-react/core**](../README.md)

***

[@eslint-react/core](../README.md) / getAttributeValue

# Function: getAttributeValue()

> **getAttributeValue**(`context`, `node`, `name`): \{ `initialScope`: `undefined` \| `Scope`; `kind`: `"none"`; `node`: `Node`; \} \| \{ `initialScope`: `undefined` \| `Scope`; `kind`: `"some"`; `node`: `Node`; `value`: `unknown`; \}

Get a StaticValue of the attribute value

## Parameters

### context

`RuleContext`

The rule context

### node

The JSX attribute node

`JSXAttribute` | `JSXSpreadAttribute`

### name

`string`

The name of the attribute

## Returns

\{ `initialScope`: `undefined` \| `Scope`; `kind`: `"none"`; `node`: `Node`; \} \| \{ `initialScope`: `undefined` \| `Scope`; `kind`: `"some"`; `node`: `Node`; `value`: `unknown`; \}

The StaticValue of the attribute value
31 changes: 31 additions & 0 deletions packages/core/docs/functions/getElementType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[**@eslint-react/core**](../README.md)

***

[@eslint-react/core](../README.md) / getElementType

# Function: getElementType()

> **getElementType**(`context`, `node`): `string`

Get the stringified type of a JSX element

## Parameters

### context

`RuleContext`

The ESLint rule context

### node

The JSX element node

`JSXElement` | `JSXFragment`

## Returns

`string`

The type of the element
31 changes: 31 additions & 0 deletions packages/core/docs/functions/hasAnyAttribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[**@eslint-react/core**](../README.md)

***

[@eslint-react/core](../README.md) / hasAnyAttribute

# Function: hasAnyAttribute()

> **hasAnyAttribute**(`context`, `names`, `attributes`, `initialScope?`): `boolean`

## Parameters

### context

`RuleContext`

### names

`string`[]

### attributes

(`JSXAttribute` \| `JSXSpreadAttribute`)[]

### initialScope?

`Scope`

## Returns

`boolean`
31 changes: 31 additions & 0 deletions packages/core/docs/functions/hasAttribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[**@eslint-react/core**](../README.md)

***

[@eslint-react/core](../README.md) / hasAttribute

# Function: hasAttribute()

> **hasAttribute**(`context`, `name`, `attributes`, `initialScope?`): `boolean`

## Parameters

### context

`RuleContext`

### name

`string`

### attributes

(`JSXAttribute` \| `JSXSpreadAttribute`)[]

### initialScope?

`Scope`

## Returns

`boolean`
Loading