Ability to pass a custom tsconfig for next dev
#23972
Replies: 12 comments 3 replies
-
Aren't these specific flags better suited for a linter like ESLint? |
Beta Was this translation helpful? Give feedback.
-
@Timer yep, for both: linters and IDEs. Not for dev servers - it interrupts the development process. So need to differentiate them by choosing different configs. P.S. There's also an issue on vscode repo - looks like it's hard to support choosing a custom config from their side: microsoft/vscode#12463 |
Beta Was this translation helpful? Give feedback.
-
I agree right now overly strict TypeScript configurations can cause a bit of headache during development. Typically, this is solved by a separate As for now, we're going to start working to make TypeScript errors as unobtrusive as possible before we hand out the knobs to completely disable this integration. Please bear with us! 🙏 |
Beta Was this translation helpful? Give feedback.
-
Even trying to disable this compiler error by setting "noUnusedLocals": false doesn't help, it looks like some tsconfig.json setting are ignored 🤔 |
Beta Was this translation helpful? Give feedback.
-
i'd like to exclude |
Beta Was this translation helpful? Give feedback.
-
When using an However I am not sure if it's right. More broadly I lack the knowledge on how to check precisely which files are included in which build to debug that. The interactions between VS Code, Next, and TypeScript are unclear to the end user. |
Beta Was this translation helpful? Give feedback.
-
I followed this approach and it worked really well for me. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Is there any plans to support this in the near future? This is causing me a lot of headaches because Next is trying to compile my test setup files in my root which means I have to have my test dependencies in |
Beta Was this translation helpful? Give feedback.
-
Funky bug I had today: |
Beta Was this translation helpful? Give feedback.
-
Now that TypeScript 4.1 is out with I suppose as suggested in facebook/create-react-app#10025, it would be possible to default to My question, which I also posed in the CRA issue above, is whether there are large, useful differences in functionality between |
Beta Was this translation helpful? Give feedback.
-
Hi guys, up on this, this is still problematic for us. Stories are included in |
Beta Was this translation helpful? Give feedback.
-
Just chiming in that passing in a custom The issue we are dealing with is that we are sharing code between both a Firebase Cloud functions project and a Next.JS project. The code sharing is absolutely amazing -- everything is typescript, you can utilize functions and code between verticals of the app, and it all works out of the box. The issue comes to deploying. Firebase needs the JS files to be emitted and can't handle Meanwhile NextJS will revert it over to It seems reasonable to just be able to pass in separate tsconfig to the NextJS environment 😇 |
Beta Was this translation helpful? Give feedback.
-
Feature request
Is your feature request related to a problem? Please describe.
I'm bored of seeing
someVar is declared but its value is never read
:I'm actively write and delete code, exploring some libraries' features - I don't want my dev server to stuck me into an error. Of course it's bad to leave them. Of course my IDE should highlight that - and for that reason, I want to have
noUnusedLocals
ornoUnusedParameters
,strict
in overall. Of course there should be some pre-commit hook that will prevent me from committing this clutter into the repository. But I don’t want my dev server to thrownoUnusedLocals
andnoUnusedParameters
- I don't want it to prevent me playing with the code.UPD. That’s okay for the default behavior, but there should be an option that these keys should be enabled by VSCode, and by linter, but not used by dev server so it won’t throw error that prevents you to do anything.
Describe the solution you'd like
I'd like an ability of passing a tsconfig path for
next dev
command.Something like:
While I can use the original tsconfig.json for my IDE.
Describe alternatives you've considered
Well, I could make an issue for IDE (
vscode
doesn't support anything other thantsconfig.json
too), but anyway - both sides should support that.UPD. There's one: microsoft/vscode#12463. Still, both sides should support that.
Additional context
Idk maybe it's possible. But I don't see it from
next dev --help
:Beta Was this translation helpful? Give feedback.
All reactions