这是indexloc提供的服务,不要输入任何密码
Skip to content

chore(packages): typecheck and abstract ts config #1807

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

Merged
merged 1 commit into from
Aug 30, 2022
Merged

Conversation

tknickman
Copy link
Member

This PR includes some packages maintenance:

  1. Abstract common tsconfigs to a shared package
  2. Unify our tsup handling (use config)
  3. Setup check type scripts
  4. Setup lint and type check in CI

@tknickman tknickman requested a review from a team as a code owner August 30, 2022 15:38
@tknickman tknickman requested review from gsoltis and gaspar09 August 30, 2022 15:38
@vercel
Copy link

vercel bot commented Aug 30, 2022

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

Name Status Preview Updated
turbo-site ✅ Ready (Inspect) Visit Preview Aug 30, 2022 at 4:32PM (UTC)

@tknickman tknickman merged commit c7277e2 into main Aug 30, 2022
@tknickman tknickman deleted the typecheck_packages branch August 30, 2022 17:43
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.

I think we have at least one issue introduced in this one.

"@types/semver": "^7.3.9",
"eslint": "^7.23.0",
"jest": "^27.4.3",
"semver": "^7.3.5",
"strip-ansi": "^6.0.1",
"ts-jest": "^27.1.1",
"tsconfig": "workspace:*",
Copy link
Contributor

Choose a reason for hiding this comment

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

WE HAVE OUR OWN NOW! 🎉

@@ -1,17 +1,6 @@
{
"exclude": ["templates"],
Copy link
Contributor

Choose a reason for hiding this comment

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

😅

"compilerOptions": {
"lib": ["ES2019"],
"target": "ES2019",
"skipLibCheck": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is unnecessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

Details about why we have this: evanw/esbuild#2388

Will add a comment about this as well

"name": "tsconfig",
"version": "0.0.0",
"private": true,
"main": "index.js"
Copy link
Contributor

Choose a reason for hiding this comment

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

This file doesn't exist.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep I knew this. This is how the tsconfig is configured in our examples and thought at one point that this was a hack to get autocompletion working, but Jared and I disproved that a while ago so I'll take it out everywhere.

Comment on lines +26 to +29
"dependencies": {
"@manypkg/find-root": "^1.1.0",
"turbo-utils": "workspace:*"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're running the build for this in advance, moving these into dependencies now conflicts with:

"build": "tsup && cp ./package.json ./dist/package.json",

Copy link
Member Author

Choose a reason for hiding this comment

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

Excellent catch - it shouldn't technically be a problem - but install times will be slower for anyone using npx (or equivalent). will fix

},
"devDependencies": {
"@manypkg/find-root": "^1.1.0",
"@types/jest": "^27.4.0",
"@types/node": "^16.11.12",
"esbuild": "^0.14.38",
"eslint": "^8.23.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally like how the diff resolves to look like you replaced esbuild with eslint.

Copy link
Member Author

Choose a reason for hiding this comment

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

Lol, this was in an effort to fix the skipLibCheck issue that you also pointed out. But it doesn't matter since it comes in via tsup anyway.

tknickman added a commit that referenced this pull request Feb 28, 2023
This was added as part of #1807, but
lost in one of our CI updates.
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.

3 participants