Skip to content

JavaScript heap out of memory with unicorn/prefer-includes with eslint-plugin-vue #2717

@kernoeb

Description

@kernoeb

Description

When using eslint-plugin-vue together with the unicorn/prefer-includes rule, running ESLint with --fix causes an infinite autofix loop.
The file content keeps duplicating until it reaches tens of thousands of lines (~60k in my tests), and in some cases, Node.js throws a JavaScript heap out of memory error.

Steps to reproduce

Open the following CodeSandbox: https://codesandbox.io/p/devbox/2xyz7v

Run ESLint with --fix
The file grows exponentially in size

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions