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

replace jsconfig with tsconfig #8179

Merged
merged 4 commits into from
Aug 13, 2023
Merged

replace jsconfig with tsconfig #8179

merged 4 commits into from
Aug 13, 2023

Conversation

turadg
Copy link
Member

@turadg turadg commented Aug 12, 2023

refs: #4620

Description

To help burn down our type resolution debt, we need a way to ensure progress we make doesn't regress. The jsconfig.json files some lax defaults: https://github.com/microsoft/TypeScript/blob/e624827f63e20096e116814a6ebfd7c8f4daed9f/src/compiler/commandLineParser.ts#L3402

This changes all those files to tsconfig.json so those values must be set explicitly. In doing this, I tested tighter settings and made the explicit config only as lax as it had to be for the lint:types to pass.

I also removed the now redundant -p option to tsc, since tsconfig.json is its default.

Security Considerations

n/a

Scaling Considerations

n/a

Documentation Considerations

none

Testing Considerations

CI

Upgrade Considerations

n/a

jsconfig had defaults that now have to be explicit, but we don't need to be as permissive as the jsconfig was
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

Just one comment I'd like an opinion on. Otherwise, nice and boring! 😉

Maybe wait for @mhofman, too if you wish.

@@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
Copy link
Member

Choose a reason for hiding this comment

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

Looking at the documentation for allowSyntheticDefaultImports, it seems like a bad practice to depend on it, and we should probably fix our code instead.

Did that turn out to be too much work, or would you like to address that change in a future PR? Otherwise, I'd be curious about your experiences trying to turn this option off.

Copy link
Member Author

@turadg turadg Aug 13, 2023

Choose a reason for hiding this comment

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

They're enabled now only where turning them off caused errors. Most of them were imports of 3rd party npm packages or NodeJS built-in modules.

Something we want to move away from but out of scope of this PR. The jsconfig filename was always enabling it. At least now it's only enabled in packages that fail without it. We can burn them down over time.

@turadg turadg added this pull request to the merge queue Aug 13, 2023
Merged via the queue into master with commit 6de5f1d Aug 13, 2023
62 checks passed
@turadg turadg deleted the ta/tsconfig branch August 13, 2023 02:30
mhofman pushed a commit that referenced this pull request Aug 15, 2023
replace jsconfig with tsconfig
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.

None yet

2 participants