jest-community / eslint-plugin-jest

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

refactor: use `flatMap` instead of `reduce` #1541

Closed G-Rath closed 6 months ago

G-Rath commented 6 months ago

I realised this while doing #1540 - shaves off a few lines which is nice

github-actions[bot] commented 6 months ago

:tada: This PR is included in version 28.0.0-next.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

SimenB commented 6 months ago

should we enable https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat-map.md?

G-Rath commented 6 months ago

I don't think it's worth it given we don't already use unicorn and this is literally all the ones it could flag 🤷

(+ we've been pretty stable for a while so I don't expect a lot of new code)

github-actions[bot] commented 6 months ago

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

The release is available on:

Your semantic-release bot :package::rocket: