jest-community / eslint-plugin-jest

ESLint plugin for Jest
MIT License
1.13k stars 230 forks source link

feat: prefer importing jest globals for specific types #1568

Closed tomquist closed 5 months ago

tomquist commented 5 months ago

Accessing the jest global in ESM must be done either through import.meta.jest or by importing it from @jest/globals. The latter is useful while migrating to ESM because the former is not accessible in non-ESM.

This adds an option to specify the types of globals for which we want to enforce the import.

tomquist commented 5 months ago

Thanks for the quick review!

github-actions[bot] commented 5 months ago

:tada: This PR is included in version 28.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: