Skip to content

Consider including some base configs in the published typescript package #28147

Closed
@weswigham

Description

@weswigham

Suggestion

With package-based paths now allowed within tsconfig extends clauses, we now have the opportunity to ship prescriptive base configs with our published package.

Use Cases

This could be useful for providing extra "defaults" for certain scenarios, like jsx, js, or a babel-y project, under paths like typescript/jsx, typescript/js and typescript/babel.

Examples

We publish, eg, react/tsconfig.json with contents:

{
    "compilerOptions": {
        "jsx": "react",
        "esModuleInterop": true,
        "allowSyntheticDefaultImports": true,
        "target": "es5",
        "module": "commonjs",
        "sourceMap": true
    }
}

so users can then write configs like:

{
    "extends": "typescript/react",
    "include": [ "src/**/*" ],
    "compilerOnSave": true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    In DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions