-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[prefer-importing-jest-globals] autofix is broken #1634
Comments
PR for Not sure about the other one... Is it just in JSX it fails? |
I've got a fix PR, but I keep getting remote: Permission to jest-community/eslint-plugin-jest.git denied to ejzimmer. when I try to push. Any ideas?
Once we've got this other fix in, I'll dig into it a little further |
You need to do your fix on a fork, and then do a pull request from your fork into our repository |
Thanks! |
🎉 This issue has been resolved in version 28.8.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The issue with the import being inserted mid-line
was still occurring after the fix above ^^ was released. I've got a PR to fix this here @G-Rath should I open a new issue for it? |
@ejzimmer na no need for a new issue, though feel free to stick We don't strictly need an issue for every PR :) |
🎉 This issue has been resolved in version 28.8.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The plugin is relying on the old version of the eslint config to check whether the code is using esmodules or commonjs.
should be something like
There doesn't seem to be an easy workaround for this, as the old structure is invalid in the new version of eslint. (ie I can't just add
parserOptions.sourceType
to my config. eslint won't run if I do).There also seems to be an issue with imports being inserted inline. If I change the plugin code to use the new version of the config, so it uses esmodule imports, I end up with a few cases similar to this:
where the import is inserted directly where it's used, rather than at the top of the file.
The text was updated successfully, but these errors were encountered: