Skip to content

feat(eslint-config): Enable array-callback-return rule #4229

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

Merged
merged 4 commits into from
Dec 6, 2021

Conversation

AbhiPrasad
Copy link
Member

Docs: https://eslint.org/docs/rules/array-callback-return

Make sure that we are returning in the callbacks passed into .map(),
.filter() and .reduce(). If we are not, we should be using
.forEach() or an explicit for loop.

Came up while reviewing Electron: getsentry/sentry-electron#390 (comment)

Docs: https://eslint.org/docs/rules/array-callback-return

Make sure that we are returning in the callbacks passed into `.map()`,
`.filter()` and `.reduce()`. If we are not, we should be using
`.forEach()` or an explicit for loop.
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2021

size-limit report

Path Base Size (3fef982) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 22.45 KB 22.45 KB +0.01% 🔺
@sentry/browser - Webpack 23.29 KB 23.29 KB 0%
@sentry/react - Webpack 23.32 KB 23.32 KB 0%
@sentry/nextjs Client - Webpack 47.98 KB 47.98 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.9 KB 29.9 KB +0.01% 🔺

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) December 6, 2021 13:05
@AbhiPrasad AbhiPrasad merged commit cabd713 into master Dec 6, 2021
@AbhiPrasad AbhiPrasad deleted the abhi-eslint-array-callback-return branch December 6, 2021 13:19
onurtemizkan pushed a commit that referenced this pull request Dec 19, 2021
Docs: https://eslint.org/docs/rules/array-callback-return

Make sure that we are returning in the callbacks passed into `.map`,
`.filter` and `.reduce`. If we are not, we should be using
`.forEach` or an explicit for loop.

Co-authored-by: iker barriocanal <[email protected]>
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