-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(remix-dev): stop automatically updating tsconfig.json
#5510
Conversation
Hi @SeanGroff, Welcome, and thank you for contributing to Remix! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
🦋 Changeset detectedLatest commit: 10ba614 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
Interesting post by Wes Bos regarding this behavior... he liked it. https://twitter.com/wesbos/status/1627707679840915456 Maybe it would make sense to notify the user and give them the option to update their config? |
While my current PR is an improvement, I think we can iterate on this solution to strike a happy middle ground between ease of use and being too forceful: 💡We keep the "Mandatory/Required" TSConfig compiler suggestions and "Recommended" compiler suggestions. However, we no longer update the TSConfig. We display our suggestions in the CLI. This provides the developer the freedom to configure the TSConfig themselves. If issues arise, maybe consider the suggestions from Remix 😀. Then we add a flag to the Remix Config that will disable the TSConfig suggestions in the terminal if the developer prefers. This should also be documented, depending on the direction we decide to go. It's important to keep in mind the scope of this PR as well. This refers to the Remix Dev server, NOT the Create Remix App generator. |
We could also prompt the developer with these changes in the CLI and they can provide input My worry here is in a team environment. A developer may not know the full implications of this change. They submit a PR, the CI fails or a Senior engineer asks them to revert their TSConfig changes. On dev teams, updating the tooling should be intentional and planned out. Preferably decoupled from any feature or bugfix work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest that we keep the warning but allowing users to opt-in to automatic changes with --fix
or something. That said, the warning should also be dismiss-able. Probably beyond the scope for this PR, but if we can leave the log in place as a warning for now I think that's a step in the right direction.
@chaance I've implemented the |
tsconfig.json
Anything else I can do to help progress this? @chaance |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
Closes: #5509
Testing Strategy:
I opened up my mac machine and ran
npm run dev
I didn't have the tsconfig compiler option
strict
specified. The Remix dev package updates my tsconfig file by adding the compiler optionstrict: true
Here's a discussion I had on Twitter about this issue: https://twitter.com/_SeanGroff/status/1626637132176424963?s=20
Updating the TSConfig file shouldn't be the default behavior. The user should have to pass a
--fix
flag to opt into$ remix dev
automatically updating the TSConfig file.