Skip to content
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

fix: correctly import jest flat configs #365

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Conversation

sbellone
Copy link
Contributor

I figured out that Jest flat configs are containing the following:

{
  plugins: { jest: plugin },
  languageOptions: { globals },
  rules,
}

https://github.com/jest-community/eslint-plugin-jest/blob/98087f9bb27082f9fbda59a56c65536fb9d8a0dc/src/index.ts#L95

So spreading the style config in the same config object than the recommended config was actually overriding it.

Tests

I've added a simple test file with some disabled rules, and set reportUnusedDisableDirectives to error so it will report if those rules are not included anymore.

@sbellone sbellone requested a review from millotp October 15, 2024 09:41
@sbellone sbellone self-assigned this Oct 15, 2024
Copy link
Contributor

@millotp millotp left a comment

Choose a reason for hiding this comment

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

good catch !

@sbellone sbellone merged commit 4162bbf into master Oct 15, 2024
@sbellone sbellone deleted the fix/jest-flat-config branch October 15, 2024 15:56
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.

2 participants