DocumentationRulesfunction-component

function-component

Full Name in eslint-plugin-react-debug

react-debug/function-component

Full Name in @eslint-react/eslint-plugin

@eslint-react/debug/function-component

Features

🐞

Presets

  • debug

What it does

Reports all function components. Useful for debugging. This rule should only be used for debugging purposes. Otherwise, leave it off.

Examples

import React from "react";
 
function Example() {
  return <button />;
}
import React from "react";
 
const Example = () => <button />;
import React from "react";
 
const Example = React.memo(() => <button />);
import React from "react";
 
const Example = React.forwardRef(() => <button />);