Rules
no-misused-capture-owner-stack
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
๐งช
Description
Prevents incorrect usage of captureOwnerStack
.
The captureOwnerStack
is only available in development builds of React and must be:
- Imported via namespace to avoid direct named imports.
- Conditionally accessed within an
if (process.env.NODE_ENV !== 'production') {...}
block to prevent execution in production environments. - The call of
captureOwnerStack
happened inside of a React controlled function (not implemented yet).