testing-library / eslint-plugin-testing-library

ESLint plugin to follow best practices and anticipate common mistakes when writing tests with Testing Library
https://npm.im/eslint-plugin-testing-library
MIT License
992 stars 142 forks source link

Bundle plugin in ESM format #900

Open Belco90 opened 7 months ago

Belco90 commented 7 months ago

The current bundle is in CJS format. Since ESLint flat config default format is ESM, we need to build the plugin for this format by default. Let's keep compatibility with CJS format for now, so we get both (we will have to point to the corresponding dist/ paths for each in the exports field of the package.json.

Some resources on how to publish in both CJS and ESM with TS: