Skip to content

build: Turn unused vars from TS error into eslint error #6747

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 1 commit into from
Jan 12, 2023

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Jan 12, 2023

Unused variables prevent us from building which is quite annoying when just testing things out and brainstorming solutions.

This PR turns the "unused var/argument" error from a typescript error into a proper eslint error, which will allow us to still build, even when there are unused variables. CI will now instead fail on the lint step, which is an added benefit because it is generally faster to retry than the build step.

@lforst lforst requested review from mydea, Lms24 and AbhiPrasad January 12, 2023 09:22
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Just yesterday, I was annoyed by this while fighting Replay tests... So i'd vote to do this, as long as we're still failing the lint job in CI 👍

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.84 KB (-0.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 61.46 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.62 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 55 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.38 KB (0%)
@sentry/browser - Webpack (minified) 66.55 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.4 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.63 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.82 KB (+0.02% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.25 KB (-0.01% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.13 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 38.33 KB (0%)

@mydea mydea changed the title ci: Turn unused vars from TS error into eslint error build: Turn unused vars from TS error into eslint error Jan 12, 2023
Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

nice! I took the freedom and renamed the scope from ci to build, as I guess it actually applies to that :) will make debugging less annoying 👍

@lforst lforst merged commit 90cfe00 into master Jan 12, 2023
@lforst lforst deleted the lforst-turn-unused-vars-into-eslint-error branch January 12, 2023 09:47
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.

4 participants