Skip to content

allow separate compilerOptions for node modulesΒ #46943

Closed
@DetachHead

Description

@DetachHead

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions