Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: use swc for tests instead of Babel#4584

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JoshuaKGoldberg merged 10 commits intotypescript-eslint:mainfromJoshuaKGoldberg:swc
Mar 2, 2022

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg commentedFeb 22, 2022
edited
Loading

PR Checklist

Overview

Uses@swc/jest instead of Babel for transpiling during tests. Roughly the same approach astypescript-eslint/tslint-to-eslint-config#1367.

Performance runs

  • Execution:hyperfine 'yarn jest' -m 25 -p 'yarn jest --clearCache' --show-output within the below packages. Terminal was in focus and no actions taken on open programs during test runs.
  • Hardware: Surface Laptop 4, 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz.
  • Software: WSL 2.0 in an Ubuntu drive via a VS Code terminal.
PackageBabel TimeSWC Time(old - new) / old x 100%
eslint-plugin206.237 s ± 3.049 s199.548 s ± 3.271 s3% faster
eslint-plugin-internal6.057 s ± 0.366 s5.200 s ± 0.254 s14% faster
Raw data

Babel inpackages/eslint-plugin pre-#4599:

  Time (mean ± σ):     206.237 s ±  3.049 s    [User: 1156.814 s, System: 40.173 s]  Range (min … max):   201.867 s … 212.914 s    25 runs

SWC inpackages/eslint-plugin pre-#4599:

  Time (mean ± σ):     199.548 s ±  3.271 s    [User: 1093.411 s, System: 40.435 s]  Range (min … max):   190.621 s … 206.566 s    25 runs

Babel inpackages/eslint-plugin-internal:

  Time (mean ± σ):      6.057 s ±  0.366 s    [User: 22.428 s, System: 1.324 s]  Range (min … max):    5.176 s …  7.015 s    25 runs

SWC inpackages/eslint-plugin-internal:

  Time (mean ± σ):      5.200 s ±  0.254 s    [User: 19.014 s, System: 1.256 s]  Range (min … max):    4.851 s …  5.725 s    25 runs

omril1 reacted with rocket emoji
@nx-cloud
Copy link

nx-cloudbot commentedFeb 22, 2022
edited
Loading

☁️ Nx Cloud Report

CI ran the following commands for commit9216077. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 48 targets

Sent with 💌 fromNxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@JoshuaKGoldberg!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day.

@netlify
Copy link

netlifybot commentedFeb 22, 2022
edited
Loading

❌ Deploy Preview fortypescript-eslint failed.

🔨 Explore the source changes:9216077

🔍 Inspect the deploy log:https://app.netlify.com/sites/typescript-eslint/deploys/621fbd8d0070c70008e82308

@JoshuaKGoldbergJoshuaKGoldberg added the DO NOT MERGEPRs which should not be merged yet labelFeb 22, 2022
@JoshuaKGoldberg
Copy link
MemberAuthor

swc-project/swc#3672 was discovered as part of this PR.

https://github.com/typescript-eslint/typescript-eslint/runs/5292666530?check_suite_focus=true

 FAIL  tests/rules/index.test.ts  ● Test suite failed to run    error: Expected ',', got ':'             |    97 |               : (fixer): TSESLint.RuleFix[] => {       |                        ^

@codecov
Copy link

codecovbot commentedFeb 22, 2022
edited
Loading

Codecov Report

Merging#4584 (9216077) intomain (fabfc2b) willincrease coverage by1.82%.
The diff coverage is98.64%.

@@            Coverage Diff             @@##             main    #4584      +/-   ##==========================================+ Coverage   92.41%   94.23%   +1.82%==========================================  Files         350      151     -199       Lines       12059     7933    -4126       Branches     3430     2560     -870     ==========================================- Hits        11144     7476    -3668+ Misses        642      262     -380+ Partials      273      195      -78
FlagCoverage Δ
unittest94.23% <98.64%> (+1.82%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
...nt-plugin/src/rules/consistent-type-definitions.ts97.14% <92.85%> (-0.16%)⬇️
...gin/src/rules/naming-convention-utils/validator.ts94.96% <100.00%> (-0.55%)⬇️
...ges/eslint-plugin/src/rules/no-misused-promises.ts98.71% <100.00%> (+0.07%)⬆️
...es/eslint-plugin/src/rules/prefer-function-type.ts97.14% <100.00%> (-0.05%)⬇️
...es/eslint-plugin/src/util/getOperatorPrecedence.ts31.42% <0.00%> (-28.58%)⬇️
.../src/rules/sort-type-union-intersection-members.ts90.74% <0.00%> (-1.80%)⬇️
...ackages/eslint-plugin/src/rules/no-invalid-this.ts78.26% <0.00%> (-1.74%)⬇️
...ckages/eslint-plugin/src/rules/no-magic-numbers.ts81.25% <0.00%> (-1.45%)⬇️
...s/eslint-plugin/src/rules/no-implicit-any-catch.ts83.33% <0.00%> (-1.29%)⬇️
.../eslint-plugin/src/rules/method-signature-style.ts87.65% <0.00%> (-1.24%)⬇️
... and301 more

@@ -85,57 +85,54 @@ export default util.createRule({
}),
...(option === 'type' && {
TSInterfaceDeclaration(node): void {
const fix = isCurrentlyTraversedNodeWithinModuleDeclaration()
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

These changes don't do anything other than get us aroundswc-project/swc#3672

bradzacher reacted with thumbs up emoji
@JoshuaKGoldbergJoshuaKGoldberg added testsanything to do with testing and removed DO NOT MERGEPRs which should not be merged yet labelsMar 1, 2022
@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewMarch 1, 2022 17:54
@JoshuaKGoldbergJoshuaKGoldberg merged commitfa381f3 intotypescript-eslint:mainMar 2, 2022
@JoshuaKGoldbergJoshuaKGoldberg deleted the swc branchMarch 2, 2022 19:10
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsMay 25, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher approved these changes

Assignees
No one assigned
Labels
testsanything to do with testing
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Experiment with SWC instead of Babel for Jest tests
2 participants
@JoshuaKGoldberg@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp