-
Notifications
You must be signed in to change notification settings - Fork 14
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
Make type checking lint rules faster - Part II #1324
Comments
With the smaller, faster config, I tried triggering a type-checking lint rule and a non-type-checking lint rule, and I saw that both were correctly caught (in gravity-and-orbits). Next I'm running lint-everything to see if this works for every repo. Things are mostly going well, but molecule-polarity hangs and reports 83 errors like this after 2.5 minutes:
The problem was that it was missing from the tsconfig. |
…linting strings, images and sounds, see #1324
…linting strings, images and sounds, see phetsims/chipper#1324
…linting strings, images and sounds, see phetsims/chipper#1324
In the commits, I got a speedup by about 2x by removing extraneous includes. But this meant I needed to list things specifically in the tsconfig/all/tsconfig.json. |
@jessegreenberg can you please review? |
Nice, that is a big improvement! I will be out of office for a few days but will try to review soon. |
Lint is working well for me after this change, I tried linting everything without cache. Type checking lint rules work great. Reporting my results on Windows - before these changes (chipper at 2a475c9) I see lint taking ~30 seconds. On master lint is taking ~20 seconds. It is faster! I see individual files added to 944c43e. Would it be better to add their containing directories or maybe up to |
The errors will be loud and clear. If lint discovers a typescript file that is not covered by the tsconfig, it will report it like this. I renamed ArithmeticModel.js => ArithmeticModel.ts and ran lint. It said:
I feel comfortable leaving tsconfig somewhat sparse where possible, and we can add patterns as we proceed. Sound OK? |
That seems very clear to me. OK thanks! Closing. |
…linting strings, images and sounds, see phetsims/chipper#1324
…linting strings, images and sounds, see phetsims/chipper#1324
…linting strings, images and sounds, see phetsims/chipper#1324
This is an offshoot of #1238, but that issue was getting too long so I created a new issue.
I observed a staggering 55 second precommit hook yesterday and wanted to double check on performance. Reading https://typescript-eslint.io/docs/linting/troubleshooting, I decided to try:
In doing so, I saw the time go from 22 seconds down to 7 seconds:
The text was updated successfully, but these errors were encountered: