ESLint Plugin Reactotron
raw JSON → 0.1.9 verified Sat Apr 25 auth: no javascript
An ESLint plugin for Reactotron that provides lint rules to enforce best practices when using Reactotron in React Native or other JavaScript projects. Currently at version 0.1.9, it is part of the Reactotron ecosystem maintained by Infinite Red. The plugin helps catch common mistakes like leaving Reactotron enabled in production code. It ships with TypeScript types and requires reactotron-core-client as a peer dependency. Unlike general ESLint plugins, it is narrowly focused on Reactotron-specific patterns.
Common errors
error Missing peer dependency: reactotron-core-client ↓
cause The plugin references reactotron-core-client internally, but it is not installed.
fix
Run 'npm install reactotron-core-client' in your project.
error Error: Plugin 'reactotron' not found ↓
cause The ESLint plugin is not installed or not configured correctly in the plugins array.
fix
Ensure 'eslint-plugin-reactotron' is installed and added to the 'plugins' array in your ESLint config.
Warnings
gotcha The plugin requires a peer dependency on reactotron-core-client, which may not be installed automatically. Ensure it is installed to avoid missing module errors. ↓
fix Install reactotron-core-client as a dependency: npm install reactotron-core-client
deprecated The 'no-reactotron-in-production' rule has been deprecated in favor of 'no-production' in version 0.2.0 (if ever released). ↓
fix Use 'reactotron/no-production' instead.
breaking CommonJS export compatibility was fixed in 0.1.9, but earlier versions had issues with CJS require(). ↓
fix Upgrade to v0.1.9 or later to avoid CommonJS compatibility issues.
Install
npm install eslint-plugin-reactotron yarn add eslint-plugin-reactotron pnpm add eslint-plugin-reactotron Imports
- default wrong
const reactotron = require('eslint-plugin-reactotron')correctimport reactotron from 'eslint-plugin-reactotron' - rules
import { rules } from 'eslint-plugin-reactotron' - Plugin
import { Plugin } from 'eslint-plugin-reactotron'
Quickstart
// .eslintrc.js
module.exports = {
plugins: ['reactotron'],
rules: {
'reactotron/no-reactotron-in-production': 'error',
},
};