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(eslint): better messaging and bug fix (#3950 #3950

Merged
merged 1 commit into from
Feb 27, 2023
Merged

Conversation

tknickman
Copy link
Member

@tknickman tknickman commented Feb 24, 2023

A few fixes for the eslint plugin.

  1. Fix error message to remove the leading $ since that was deprecated in 1.5
  2. Provides more explicit error messaging
  3. Fixes a bug that could cause the rule to exit early if no global deps were provided
  4. Cleans up / standardizes tests and mocks

This should also fix #3943

@tknickman tknickman requested review from a team as code owners February 24, 2023 20:07
@turbo-orchestrator turbo-orchestrator bot added pkg: turbo-eslint eslint-config-turbo and eslint-plugin-turbo team: turbopack labels Feb 24, 2023
@vercel
Copy link

vercel bot commented Feb 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 27, 2023 at 2:30PM (UTC)
9 Ignored Deployments
Name Status Preview Comments Updated
examples-basic-web ⬜️ Ignored (Inspect) Feb 27, 2023 at 2:30PM (UTC)
examples-cra-web ⬜️ Ignored (Inspect) Feb 27, 2023 at 2:30PM (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Feb 27, 2023 at 2:30PM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Feb 27, 2023 at 2:30PM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Feb 27, 2023 at 2:30PM (UTC)
examples-nonmonorepo ⬜️ Ignored (Inspect) Feb 27, 2023 at 2:30PM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Feb 27, 2023 at 2:30PM (UTC)
examples-tailwind-web ⬜️ Ignored (Inspect) Feb 27, 2023 at 2:30PM (UTC)
examples-vite-web ⬜️ Ignored (Inspect) Feb 27, 2023 at 2:30PM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (linux)
  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

@github-actions
Copy link
Contributor

Benchmark for 9cbcb8e

Test Base PR % Significant %
bench_hmr_to_eval/Turbopack RCC/1000 modules 14.81ms ± 0.17ms 13.97ms ± 0.16ms -5.72% -1.30%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 12.52ms ± 0.12ms 12.58ms ± 0.14ms +0.44%
bench_hmr_to_commit/Turbopack RCC/1000 modules 15.87ms ± 0.23ms 16.33ms ± 0.14ms +2.88%
bench_hmr_to_commit/Turbopack RSC/1000 modules 520.34ms ± 1.71ms 518.60ms ± 0.89ms -0.33%
bench_hmr_to_commit/Turbopack SSR/1000 modules 12.50ms ± 0.12ms 12.44ms ± 0.12ms -0.46%
bench_hmr_to_eval/Turbopack CSR/1000 modules 11.56ms ± 0.10ms 11.56ms ± 0.11ms -0.04%
bench_hmr_to_eval/Turbopack RCC/1000 modules 14.81ms ± 0.17ms 13.97ms ± 0.16ms -5.72% -1.30%
bench_hmr_to_eval/Turbopack SSR/1000 modules 11.39ms ± 0.09ms 11.40ms ± 0.07ms +0.06%
bench_hydration/Turbopack RCC/1000 modules 3912.08ms ± 9.91ms 3879.60ms ± 9.00ms -0.83%
bench_hydration/Turbopack RSC/1000 modules 3551.10ms ± 16.14ms 3537.29ms ± 11.59ms -0.39%
bench_hydration/Turbopack SSR/1000 modules 3413.49ms ± 12.15ms 3406.33ms ± 7.85ms -0.21%
bench_startup/Turbopack CSR/1000 modules 2602.39ms ± 7.30ms 2578.55ms ± 5.61ms -0.92%
bench_startup/Turbopack RCC/1000 modules 2387.08ms ± 5.07ms 2392.59ms ± 6.52ms +0.23%
bench_startup/Turbopack RSC/1000 modules 2338.09ms ± 6.37ms 2339.21ms ± 6.94ms +0.05%
bench_startup/Turbopack SSR/1000 modules 2095.75ms ± 3.78ms 2089.61ms ± 2.19ms -0.29%

@github-actions
Copy link
Contributor

Benchmark for 07f1285

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 11.60ms ± 0.12ms 11.62ms ± 0.08ms +0.11%
bench_hmr_to_commit/Turbopack RCC/1000 modules 13.93ms ± 0.13ms 14.17ms ± 0.13ms +1.72%
bench_hmr_to_commit/Turbopack RSC/1000 modules 527.21ms ± 0.74ms 527.56ms ± 2.54ms +0.07%
bench_hmr_to_commit/Turbopack SSR/1000 modules 11.58ms ± 0.13ms 11.58ms ± 0.13ms -0.04%
bench_hmr_to_eval/Turbopack CSR/1000 modules 10.71ms ± 0.11ms 10.55ms ± 0.06ms -1.47%
bench_hmr_to_eval/Turbopack RCC/1000 modules 13.36ms ± 0.19ms 13.09ms ± 0.12ms -2.03%
bench_hmr_to_eval/Turbopack SSR/1000 modules 10.62ms ± 0.12ms 10.57ms ± 0.10ms -0.54%
bench_hydration/Turbopack RCC/1000 modules 3929.76ms ± 14.49ms 3936.17ms ± 13.46ms +0.16%
bench_hydration/Turbopack RSC/1000 modules 3562.30ms ± 8.78ms 3567.84ms ± 9.93ms +0.16%
bench_hydration/Turbopack SSR/1000 modules 3422.66ms ± 11.26ms 3425.58ms ± 19.80ms +0.09%
bench_startup/Turbopack CSR/1000 modules 2638.48ms ± 8.75ms 2603.39ms ± 10.27ms -1.33%
bench_startup/Turbopack RCC/1000 modules 2387.87ms ± 8.68ms 2401.84ms ± 8.01ms +0.59%
bench_startup/Turbopack RSC/1000 modules 2358.03ms ± 11.29ms 2343.42ms ± 9.64ms -0.62%
bench_startup/Turbopack SSR/1000 modules 2103.65ms ± 3.15ms 2108.47ms ± 6.29ms +0.23%

@tknickman
Copy link
Member Author

Published this as a canary for a few discord members to try out: https://www.npmjs.com/package/eslint-plugin-turbo/v/0.0.9-canary.0

@github-actions
Copy link
Contributor

Benchmark for d9d3ad4

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 11.33ms ± 0.10ms 11.33ms ± 0.07ms -0.05%
bench_hmr_to_commit/Turbopack RCC/1000 modules 15.62ms ± 0.17ms 15.66ms ± 0.20ms +0.20%
bench_hmr_to_commit/Turbopack RSC/1000 modules 506.58ms ± 4.37ms 504.48ms ± 1.57ms -0.42%
bench_hmr_to_commit/Turbopack SSR/1000 modules 11.38ms ± 0.13ms 11.41ms ± 0.08ms +0.20%
bench_hmr_to_eval/Turbopack CSR/1000 modules 10.32ms ± 0.08ms 10.39ms ± 0.07ms +0.66%
bench_hmr_to_eval/Turbopack RCC/1000 modules 14.67ms ± 0.58ms 14.62ms ± 0.18ms -0.37%
bench_hmr_to_eval/Turbopack SSR/1000 modules 10.34ms ± 0.08ms 10.40ms ± 0.09ms +0.52%
bench_hydration/Turbopack RCC/1000 modules 3784.67ms ± 13.24ms 3785.16ms ± 13.42ms +0.01%
bench_hydration/Turbopack RSC/1000 modules 3458.57ms ± 8.00ms 3440.97ms ± 7.91ms -0.51%
bench_hydration/Turbopack SSR/1000 modules 3343.75ms ± 11.33ms 3319.60ms ± 8.36ms -0.72%
bench_startup/Turbopack CSR/1000 modules 2552.07ms ± 3.96ms 2541.95ms ± 9.83ms -0.40%
bench_startup/Turbopack RCC/1000 modules 2319.14ms ± 6.41ms 2322.25ms ± 4.87ms +0.13%
bench_startup/Turbopack RSC/1000 modules 2282.70ms ± 10.07ms 2288.72ms ± 8.55ms +0.26%
bench_startup/Turbopack SSR/1000 modules 2042.24ms ± 1.87ms 2039.81ms ± 3.59ms -0.12%

Copy link
Contributor

@nathanhammond nathanhammond left a comment

Choose a reason for hiding this comment

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

🛠🚢

@tknickman tknickman changed the title fix(eslint): better messaging and bug fix fix(eslint): better messaging and bug fix (#3950 Feb 27, 2023
@tknickman tknickman merged commit 953adf4 into main Feb 27, 2023
@tknickman tknickman deleted the fix_eslint branch February 27, 2023 14:50
@github-actions
Copy link
Contributor

Benchmark for 2705ee3

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 2704.01ms ± 7.03ms 2664.17ms ± 7.56ms -1.47% -0.40%
bench_startup/Turbopack SSR/1000 modules 2116.08ms ± 4.27ms 2147.87ms ± 4.63ms +1.50% +0.66%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 12.68ms ± 0.10ms 12.71ms ± 0.11ms +0.20%
bench_hmr_to_commit/Turbopack RCC/1000 modules 18.01ms ± 1.68ms 16.11ms ± 0.32ms -10.54%
bench_hmr_to_commit/Turbopack RSC/1000 modules 521.16ms ± 1.69ms 520.92ms ± 1.82ms -0.05%
bench_hmr_to_commit/Turbopack SSR/1000 modules 12.63ms ± 0.13ms 12.67ms ± 0.14ms +0.32%
bench_hmr_to_eval/Turbopack CSR/1000 modules 11.67ms ± 0.11ms 11.65ms ± 0.09ms -0.14%
bench_hmr_to_eval/Turbopack RCC/1000 modules 14.44ms ± 0.27ms 14.16ms ± 0.12ms -1.96%
bench_hmr_to_eval/Turbopack SSR/1000 modules 11.61ms ± 0.10ms 11.65ms ± 0.09ms +0.28%
bench_hydration/Turbopack RCC/1000 modules 3993.30ms ± 14.85ms 3995.45ms ± 12.44ms +0.05%
bench_hydration/Turbopack RSC/1000 modules 3668.05ms ± 15.45ms 3644.27ms ± 12.15ms -0.65%
bench_hydration/Turbopack SSR/1000 modules 3484.07ms ± 10.19ms 3495.35ms ± 12.95ms +0.32%
bench_startup/Turbopack CSR/1000 modules 2704.01ms ± 7.03ms 2664.17ms ± 7.56ms -1.47% -0.40%
bench_startup/Turbopack RCC/1000 modules 2428.68ms ± 9.68ms 2407.27ms ± 8.11ms -0.88%
bench_startup/Turbopack RSC/1000 modules 2354.75ms ± 11.59ms 2363.87ms ± 7.67ms +0.39%
bench_startup/Turbopack SSR/1000 modules 2116.08ms ± 4.27ms 2147.87ms ± 4.63ms +1.50% +0.66%

@wladpaiva
Copy link

wladpaiva commented Feb 27, 2023

Not sure if the benchmark is testing it but the turbo/no-undeclared-env-vars rule seems to be extremely slow on the 0.0.9. @tknickman
Confirming it does work with the new turbo.json under the project's folder 👍
Screenshot 2023-02-27 at 3 44 02 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: turbo-eslint eslint-config-turbo and eslint-plugin-turbo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[turborepo] [eslint-plugin-turbo] eslint-pugin-turbo can't read jsonc turbo.json
3 participants