Skip to content

Conversation

emersion
Copy link
Contributor

@emersion emersion commented Oct 7, 2025

Rollup Plugin Name: eslint

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

Update package.json to make eslint a peerDependency, so that the
user has control over which version to pick. Move the existing
eslint dependency to devDependencies so that tests work as expected.

Introduce a new test to ensure the plugin works with ESLint v9. To
do so without breaking v8 tests, install ESLint v9 under a different
alias, and use an ESM import mocking library to override the "eslint"
import.

The current directory needs to be changed during the ESLint v9 test
so that ESLint finds its config file properly. This requires ava
workerThreads to be disabled:

TypeError [ERR_WORKER_UNSUPPORTED_OPERATION]: process.chdir() is not supported in workers

Ref #1729 which was a previous attempt at this.

The root workspace was missing an eslint dependency, but was
invoking the eslint CLI directly in the scripts. Make the
dependency explicit.
@emersion emersion requested a review from shellscape as a code owner October 7, 2025 11:24
The parent package hasn't opt in to ES modules, which breaks on
Node.js v18:

    (node:5286) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
Update package.json to make eslint a peerDependency, so that the
user has control over which version to pick. Move the existing
eslint dependency to devDependencies so that tests work as expected.

Introduce a new test to ensure the plugin works with ESLint v9. To
do so without breaking v8 tests, install ESLint v9 under a different
alias, and use an ESM import mocking library to override the "eslint"
import.

The current directory needs to be changed during the ESLint v9 test
so that ESLint finds its config file properly. This requires ava
workerThreads to be disabled:

    TypeError [ERR_WORKER_UNSUPPORTED_OPERATION]: process.chdir() is not supported in workers
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.

1 participant