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

Use tsconfig bases for the tsconfig in the template #753

Closed
orta opened this issue Jul 7, 2020 · 2 comments
Closed

Use tsconfig bases for the tsconfig in the template #753

orta opened this issue Jul 7, 2020 · 2 comments
Labels
scope: templates Related to an init template, not necessarily to core (but could influence core) solution: duplicate This issue or pull request already exists

Comments

@orta
Copy link
Contributor

orta commented Jul 7, 2020

Current Behavior

Today my TSConfig looks like:

{
  "include": ["src", "types", "test"],
  "compilerOptions": {
    "target": "es5",
    "module": "esnext",
    "lib": ["dom", "esnext"],
    "importHelpers": true,
    "declaration": true,
    "sourceMap": true,
    "rootDir": "./",
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "strictPropertyInitialization": true,
    "noImplicitThis": true,
    "alwaysStrict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "moduleResolution": "node",
    "baseUrl": "./",
    "paths": {
      "*": ["src/*", "node_modules/*"]
    },
    "jsx": "react",
    "esModuleInterop": true
  }
}

It could be:

{
  "include": ["src", "types", "test"],
  "extends": "@tsconfig/tsdx"
}

Then when I make a change specific to my project it's very obvious:

{
  "include": ["src", "types", "test"],
  "extends": "@tsconfig/tsdx",
  "compilerOptions": {
        "noImplicitReturns": false
  }
}

See:

Who does this impact? Who is this for?

Should be useful to anyone regardless of their TS level

Describe alternatives you've considered

Don't, which is also OK

@agilgur5
Copy link
Collaborator

agilgur5 commented Jul 7, 2020

Sounds like a duplicate of #634. That hasn't gotten many comments, however, though lots of related issues in support of it and this sounds directly in support for a tsconfig preset.

@orta is there any reason to use https://github.com/tsconfig/bases / @tsconfig/tsdx as opposed to hosting it under @tsdx/tsconfig? Looking to use a monorepo in the near future for presets, integrations, etc.

@agilgur5 agilgur5 closed this as completed Jul 7, 2020
@agilgur5 agilgur5 added the solution: duplicate This issue or pull request already exists label Jul 7, 2020
@orta
Copy link
Contributor Author

orta commented Jul 8, 2020

No strong reason other than network effects of it being the same tool others use - I doubt we'll ever bake it into the compiler.

@agilgur5 agilgur5 added the scope: templates Related to an init template, not necessarily to core (but could influence core) label Oct 12, 2020
@agilgur5 agilgur5 added this to the Future Non-breaking milestone Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: templates Related to an init template, not necessarily to core (but could influence core) solution: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants