Skip to content

allow separate compilerOptions for node modules #46943

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

Closed
5 tasks done
DetachHead opened this issue Nov 29, 2021 · 1 comment
Closed
5 tasks done

allow separate compilerOptions for node modules #46943

DetachHead opened this issue Nov 29, 2021 · 1 comment

Comments

@DetachHead
Copy link
Contributor

Suggestion

πŸ” Search Terms

tsconfig compilerOptions node_modules

βœ… Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

it would be nice if you could include your tsconfig.json in your published package, and projects that depend on it could use its compilerOptions when type checking it

πŸ“ƒ Motivating Example

it's frustrating when you try to enable strictness flags in your project, only for it to cause type errors in node_modules. if each package included its tsconfig.json it could type-check them with the compilerOptions defined there, instead of your project's tsconfig.json which should only really apply to the source code that you can control

πŸ’» Use Cases

enabling strictness flags without having to enable skipLibCheck

@MartinJohns
Copy link
Contributor

This essentially sounds the same as #37853.

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

No branches or pull requests

2 participants