react/react-in-jsx-scope
eslint-plugin-react
No autofixRecommended
eslint.config.js
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/react-in-jsx-scope": "error",
},
},
];var Hello = <div>Hello {this.props.name}</div>;/** @jsx Foo.bar */
var React = require('react');
var Hello = <div>Hello {this.props.name}</div>;import React from 'react';
var Hello = <div>Hello {this.props.name}</div>;var React = require('react');
var Hello = <div>Hello {this.props.name}</div>;/** @jsx Foo.bar */
var Foo = require('foo');
var Hello = <div>Hello {this.props.name}</div>;Examples from the ESLint documentation.
react/react-in-jsx-scope
eslint-plugin-react
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/react-in-jsx-scope": "error",
},
},
];react/react-in-jsx-scope
react plugin · suspicious
{
"plugins": [
"react"
],
"rules": {
"react/react-in-jsx-scope": "error"
}
}Biome does not have this rule.
Disallow usage of unknown DOM property
Disallow missing props validation in a React component definition
Disallow target="_blank" attribute without rel="noreferrer"
Disallow missing displayName in a React component definition
Disallow unescaped HTML entities from appearing in markup