Skip to content

Conversation

@lumirlumir
Copy link
Member

@lumirlumir lumirlumir commented Jan 1, 2026

Prerequisites checklist

What is the purpose of this pull request?

In this PR, I've resolved the issue mentioned in eslint/json#196, removing rollup and extraneous types and migrating the package to ESM-only.

The main focus of this PR is removing much of the logic and the workarounds we previously used to support a dual CommonJS/ESM package.

Some notable parts are as follows:

What changes did you make? (Give an overview)

In this PR, I've resolved the issue mentioned in #196, removing rollup and extraneous types and migrating the package to ESM-only.

Related Issues

Is there anything you'd like reviewers to focus on?

I didn't intentionally remove tests/types/cjs-import.test.cts since require(ESM) is now enabled. However, if removing it is the right course of action, I'm happy to do so.

@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Jan 1, 2026
@eslint-github-bot eslint-github-bot bot added breaking bug Something isn't working labels Jan 1, 2026
@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label Jan 1, 2026
@lumirlumir lumirlumir moved this from Needs Triage to Implementing in Triage Jan 1, 2026
@lumirlumir lumirlumir moved this from Implementing to Needs Triage in Triage Jan 2, 2026
@lumirlumir lumirlumir marked this pull request as ready for review January 2, 2026 09:46
Copilot AI review requested due to automatic review settings January 2, 2026 09:46
@lumirlumir lumirlumir requested a review from a team January 2, 2026 09:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request migrates the @eslint/css package from a dual CommonJS/ESM format to ESM-only, following the pattern established in the @eslint/markdown plugin. The migration simplifies the build process by removing Rollup bundling and the associated workarounds previously needed to support both module systems.

  • Removes Rollup build configuration and related tooling (dedupe-types.js, update-cts.js)
  • Simplifies TypeScript configuration to output directly to dist/ instead of separate dist/esm and dist/cjs directories
  • Updates package.json exports to provide only ESM entry points
  • Adds @arethetypeswrong/cli to CI pipeline to validate type definitions

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.json Simplified configuration to use include instead of files, removed dual-output setup, and updated outDir to single dist/ directory
tsconfig.esm.json Removed as no longer needed for ESM-only package
tools/update-cts.js Removed tool that converted .js references to .cjs (no longer needed without CommonJS support)
tools/dedupe-types.js Removed tool that deduplicated types in rolled-up files (no longer needed without Rollup)
rollup.config.js Removed Rollup bundler configuration entirely
package.json Updated entry points to single ESM format, simplified build scripts, added @arethetypeswrong/cli dependency, and reorganized lint-staged configuration
jsr.json Updated export path from dist/esm to dist
.github/workflows/ci.yml Added new CI job to validate type definitions using @arethetypeswrong/cli

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion breaking bug Something isn't working

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

Change Request: Remove rollup and migrate to ESM-only as part of the upcoming v1.0.0 (JSON/CSS)

2 participants