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

core(lint): Add custom no-focused-tests and no-skipped-tests rules #13461

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Aug 26, 2024

I noticed that it.skip and it.only usage is not correctly flagged in vitest files by our jest eslint plugin. To fix this, I initially wanted to add eslint-plugin-vitest but realized it requires Eslint 9 which we can't use (we're on eslint 7) because it requires Node 18 🙃

So instead, this PR adds two simple custom rules to ignore (it|test|describe).(skip|only). These rules now also flag vitest-based skip and only functions but led to duplications with the two rules from eslint-plugin-jest. So this PR also disables the jest versions in favour of the custom rules. To be clear, the custom rules are likely a bit less robust than the jest/vitest version but until we can use the actual vitest plugin, I think it's fine to stay with our custom version.

closes #13429

@Lms24 Lms24 self-assigned this Aug 26, 2024
@Lms24 Lms24 requested review from a team, lforst and nicohrubec and removed request for a team August 26, 2024 14:32
@Lms24 Lms24 enabled auto-merge (squash) August 27, 2024 11:23
Copy link
Contributor

github-actions bot commented Aug 27, 2024

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 22.52 KB - -
@sentry/browser (incl. Tracing) 34.85 KB - -
@sentry/browser (incl. Tracing, Replay) 71.27 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 64.54 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 75.62 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 88.35 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.18 KB - -
@sentry/browser (incl. metrics) 26.83 KB - -
@sentry/browser (incl. Feedback) 39.59 KB - -
@sentry/browser (incl. sendFeedback) 27.18 KB - -
@sentry/browser (incl. FeedbackAsync) 31.9 KB - -
@sentry/react 25.28 KB - -
@sentry/react (incl. Tracing) 37.83 KB - -
@sentry/vue 26.66 KB - -
@sentry/vue (incl. Tracing) 36.68 KB - -
@sentry/svelte 22.65 KB - -
CDN Bundle 23.77 KB - -
CDN Bundle (incl. Tracing) 36.53 KB - -
CDN Bundle (incl. Tracing, Replay) 70.91 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 76.22 KB - -
CDN Bundle - uncompressed 69.61 KB - -
CDN Bundle (incl. Tracing) - uncompressed 108.28 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 219.8 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 232.99 KB - -
@sentry/nextjs (client) 37.6 KB - -
@sentry/sveltekit (client) 35.44 KB - -
@sentry/node 115.91 KB - -
@sentry/node - without tracing 90.01 KB - -
@sentry/aws-serverless 99.45 KB - -

View base workflow run

@Lms24 Lms24 force-pushed the lms/chore-lint-no-skipped-focused-tests branch 2 times, most recently from 369f865 to 203049b Compare August 27, 2024 12:31
@Lms24 Lms24 force-pushed the lms/chore-lint-no-skipped-focused-tests branch from 203049b to faa749e Compare August 29, 2024 14:20
@Lms24 Lms24 merged commit 03d67c9 into develop Aug 29, 2024
156 checks passed
@Lms24 Lms24 deleted the lms/chore-lint-no-skipped-focused-tests branch August 29, 2024 14:46
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.

Add Vitest eslint plugin
2 participants