Skip to content

Conversation

@SeanBarker182
Copy link
Contributor

Please verify the following:

  • yarn build-and-test:local passes
  • I have added tests for any new features, if relevant
  • README.md (or relevant documentation) has been updated with your changes

Describe your PR

Fixes: infinitered/ignite#2997

Problem

The eslint-plugin-reactotron v0.1.8 fails with "Definition for rule 'reactotron/no-tron-in-production' was not found". This affects all new Ignite CLI projects and any project using the ESLint plugin.

Root Cause

Migration from Rollup to react-native-builder-bob changed the CommonJS export format. Builder Bob outputs exports.default = plugin (standard Babel behavior), but ESLint expects the plugin to be available directly as the module export, not nested under .default.

Solution

Modified the source code export structure to improve CommonJS compatibility:

// Before
const eslintPluginReactotron: Linter.Plugin = {
  rules: {
    "no-tron-in-production": noTronInProduction,
  },
} satisfies Linter.Plugin

export default eslintPluginReactotron

// After  
export const rules: Record<string, any> = {
  "no-tron-in-production": noTronInProduction,
}

const plugin: Linter.Plugin = { rules }
export default plugin

@SeanBarker182 SeanBarker182 changed the title Fix/eslint exports fix(eslint-plugin-reactotron): Fix ESLint Plugin CommonJS Export Compatibility Sep 19, 2025
@SeanBarker182 SeanBarker182 merged commit 8c16592 into master Sep 19, 2025
7 checks passed
@SeanBarker182 SeanBarker182 deleted the fix/eslint-exports branch September 19, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESLint error when creating a new Project

3 participants