Skip to content
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

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

Closed
weswigham opened this issue Oct 25, 2018 · 1 comment
Closed
Labels
In Discussion Not yet reached consensus Suggestion An idea for TypeScript

Comments

@weswigham
Copy link
Member

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
}
@weswigham weswigham added Suggestion An idea for TypeScript In Discussion Not yet reached consensus labels Oct 25, 2018
@RyanCavanaugh
Copy link
Member

These are in the @tsconfig namespace instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In Discussion Not yet reached consensus Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants