Skip to content

[Bug]: "Do not use isMounted" linting errors after upgrading to latest eslint-plugin-react (v7.36.0) #3819

Closed
@ethanPlumbly

Description

@ethanPlumbly

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

Before upgrading from v7.35.2 to v7.36.0, my linting tests were running with no errors, now they throw 4 errors about the usage of isMounted

npm run lint output:

  277:5   error    Do not use isMounted                      react/no-is-mounted
  281:21  error    Do not use isMounted                      react/no-is-mounted
  359:5   error    Do not use isMounted                      react/no-is-mounted
  378:5   error    Do not use isMounted                      react/no-is-mounted

✖ 40 problems (4 errors, 36 warnings)

We are not using isMounted in our codebase

full command used: npm run rm && npm i --dev && npm run build && npm run lint

I later pinned the version back to v7.35.2 and the errors were no longer present

Expected Behavior

Before the upgrade:

✖ 36 problems (0 errors, 36 warnings)

eslint-plugin-react version

v7.36.0

eslint version

v8.57.0

node version

v16.20.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions