-
Notifications
You must be signed in to change notification settings - Fork 85
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
Remove monorepo-wide tsconfig #1285
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
A-backend
area/blocks
Relates to first-party blocks (area)
area/apps > hash*
Affects HASH (a `hash-*` app)
area/apps > hash-api
Affects the HASH API (app)
labels
Oct 28, 2022
github-actions
bot
added
the
area/infra
Relates to version control, CI, CD or IaC (area)
label
Nov 1, 2022
CiaranMn
previously approved these changes
Nov 2, 2022
Co-authored-by: Ciaran Morinan <37743469+CiaranMn@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## main #1285 +/- ##
=======================================
Coverage 40.01% 40.01%
=======================================
Files 320 320
Lines 16424 16424
Branches 819 819
=======================================
Hits 6572 6572
Misses 9847 9847
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
CiaranMn
approved these changes
Nov 2, 2022
Alfred-Mountfield
pushed a commit
that referenced
this pull request
Nov 10, 2022
Alfred-Mountfield
pushed a commit
that referenced
this pull request
Nov 10, 2022
vilkinsons
added
type/eng > frontend
Owned by the @frontend team
area/apps > hash-search-loader
area/apps > hash-realtime
area/tests > playwright
New or updated Playwright tests
area/tests > integration
New or updated integration tests
type/eng > backend
Owned by the @backend team
and removed
area: frontend
labels
Jul 19, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/apps > hash*
Affects HASH (a `hash-*` app)
area/apps > hash-api
Affects the HASH API (app)
area/apps > hash-realtime
area/apps > hash-search-loader
area/blocks
Relates to first-party blocks (area)
area/infra > docker
area/infra
Relates to version control, CI, CD or IaC (area)
area/tests > integration
New or updated integration tests
area/tests > playwright
New or updated Playwright tests
type/eng > backend
Owned by the @backend team
type/eng > frontend
Owned by the @frontend team
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🌟 What is the purpose of this PR?
This PR removes top-level
tsconfig.json
and movestsconfig.base.json
into a workspace named@local/tsconfig
. Thus, all monorepo workspaces explicitly extend@local/tsconfig/block.json
or@local/tsconfig/legacy-base-to-refactor.json
. Dropping top-leveltsconfig.json
enables further improvements in the monorepo’s TSC / ESLint setup.🔗 Related links
🚫 Blocked by
.eslintrc.cjs
files #1315🔍 What does this change?
@hashintel/tsconfig
is moved frompackages/hash/tsconfig
tolibs/javascript/@local/tsconfig
and the workspace is renamed to@local/tsconfig
. The plan is to move more workspaces tolibs/javascript
in the future, this is just a start.Each
tsconfig.json
file explicitly extends from@local/tsconfig
.Each TypeScript workspace explicitly depends on
@local/tsconfig
andtypescript
, which ensures that dependency topology is accurate. This enables Yarn PnP and focused installs in the future.Workspace-specific ESlint configs are configured to use local tsconfig files in order to correctly apply
@typescript-eslint/*
rules.Bonus: Top-level
yarn codegen
is migrated to Turborepo for faster switches between branches. It is also possible to runyarn turbo run build
if needed (although this is not used anywhere yet).📜 Does this require a change to the docs?
packages/hash/frontend/next.config.js
shows ESLint errors, butyarn lint:eslint
does not fail because this script callseslint --ext .js,.ts,.tsx ./src/
. This is an inherited problem and its fix is out of this PR's scope.🐾 Next steps
🛡 What tests cover this?
Referring to
@local/tsconfig
topackage.json
files does not breakyarn build
in blocks.❓ How to test this?