Ability to pass a custom tsconfig for `next dev`
See original GitHub issueFeature 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
or noUnusedParameters
, 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 throw noUnusedLocals
and noUnusedParameters
- 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:
next dev --tsconfig=tsconfig.devserver.json
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 than tsconfig.json
too), but anyway - both sides should support that.
UPD. There’s one: https://github.com/Microsoft/vscode/issues/12463. Still, both sides should support that.
Additional context
Idk maybe it’s possible. But I don’t see it from next dev --help
:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:10 (8 by maintainers)
Top GitHub Comments
i’d like to exclude
test.tsx?
files from next compilation, but need to include the files intsconfig.json
so i get proper autocomplete in VSCode. any ideas how to solve this?I agree right now overly strict TypeScript configurations can cause a bit of headache during development. Typically, this is solved by a separate
tsconfig.prod.json
you run over your code base usingtsc
w/ noEmit.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! 🙏