Rules
is-from-react
Reports all identifiers initialized from React in JSON format. Useful for debugging. This rule should only be used for debugging purposes; otherwise, leave it off.
Full Name in eslint-plugin-react-debug
react-debug/is-from-reactFeatures
🐞
Presets
Rule Details
import { useState } from "react";
// ^^^^^^^^
// - [initialized from react] name: 'useState', import source: 'react'.import React from "react";
// ^^^^^
// - [initialized from react] name: 'React', import source: 'react'.
const Children = React.Children;
// ^^^^^^^^ ^^^^^ ^^^^^^^^
// | | - [initialized from react] name: 'Children', import source: 'react'.
// | - [initialized from react] name: 'React', import source: 'react'.
// - [initialized from react] name: 'Children', import source: 'react'.
const toArray = Children.toArray;
// ^^^^^^^ ^^^^^^^^ ^^^^^^^
// | | - [initialized from react] name: 'toArray', import source: 'react'.
// | - [initialized from react] name: 'Children', import source: 'react'.
// - [initialized from react] name: 'Children', import source: 'react'.When settings["react-x"].importSource is set to "@pika/react"
import { useState } from "@pika/react";
// ^^^^^^^^
// - [initialized from react] name: 'useState', import source: '@pika/react'.import React from "@pika/react";
// ^^^^^
// - [initialized from react] name: 'React', import source: '@pika/react'.
const Children = React.Children;
// ^^^^^^^^ ^^^^^ ^^^^^^^^
// | | - [initialized from react] name: 'Children', import source: '@pika/react'.
// | - [initialized from react] name: 'React', import source: '@pika/react'.
// - [initialized from react] name: 'Children', import source: '@pika/react'.
const toArray = Children.toArray;
// ^^^^^^^ ^^^^^^^^ ^^^^^^^
// | | - [initialized from react] name: 'toArray', import source: '@pika/react'.
// | - [initialized from react] name: 'Children', import source: '@pika/react'.
// - [initialized from react] name: 'Children', import source: '@pika/react'.Resources
See Also
react-debug/function-component
Reports all function components in JSON format in JSON format.react-debug/hook
Reports all React Hooks in JSON format.react-debug/is-from-ref
Reports all identifiers initialized or derived from refs in JSON format.
hook
Reports all React Hooks in JSON format. Useful for debugging. This rule should be used only for debugging purposes; otherwise, leave it off.
is-from-ref
Reports all identifiers initialized or derived from refs in JSON format. Useful for debugging. This rule should only be used for debugging purposes; otherwise, leave it off.