Skip to content

[bug] error-boundaries false positives on non-react code #1690

@reteps

Description

@reteps

Describe the bug

I have two questions:

  1. Am I allowed to run @eslint-react on non-react files?

If no, you can ignore this report.

Reproduction

import passport from 'passport';
try {
  const { getAzureStrategy } = await import('./ee/auth/azure/index.js');
  passport.use(getAzureStrategy());
} catch (err) {
 logger.error('Error initializing PrairieLearn server:', err);
 throw err;
}

Expected behavior

No error

Platform and versions

Node 24, eslint-react v4, eslint v10

Stack trace

Use an Error Boundary instead of try/catch around the 'use' hook. The 'use' hook suspends the component, and its errors can only be caught by Error Boundaries.
@eslint-react/error-boundaries

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions