frontend-coding-standards icon indicating copy to clipboard operation
frontend-coding-standards copied to clipboard

Add default tsconfig.json

Open skulptur opened this issue 5 years ago • 4 comments

This uses the default tsconfig.json generated with tsc --init (tsc Version 3.9.5).

Only change from that right now is adding "importsNotUsedAsValues": "error"

skulptur avatar Jun 18 '20 15:06 skulptur

I think that we don't need a default tsconfig.json, as it will have to be updated either whenever TS decides to add something or when node upgrades and we need to support a new module or target.

So I would much rather have tsconfig.json's defined in our skeletons, where we can change them when we decided to bump our Node or Typescript versions

psimk avatar Oct 11 '21 20:10 psimk

So I would much rather have tsconfig.json's defined in our skeletons, where we can change them when we decided to bump our Node or Typescript versions

That's something that should definitely happen.

I think that we don't need a default tsconfig.json, as it will have to be updated either whenever TS decides to add something or when node upgrades and we need to support a new module or target.

I think the main reason for this is "documentation" purposes (and) as a starting point for any other project/library/skeleton that we create.

Maybe instead of a file, we could make it a markdown page, that includes:

  • The TS version this is last updated for
  • The configs where we explicitly want a certain value, either because of or coding standards / linting (e.g. strict mode, or how we import types)
  • And some configs that we set or change most of the times to make them work for certain project types (e.g. moduleResolution, types, etc).

And for the bottom 2, an explanation for why we dictate or advise these settings, to serve as documentation.

@psimk @skulptur how do you feel about that?

ThaNarie avatar Nov 12 '21 09:11 ThaNarie

Do we still need this PR? The tsconfig.json is now part of the Skeletons I assume

ThijsTyZ avatar Feb 21 '22 16:02 ThijsTyZ

@ThijsTyZ This PR no, but we probably want to turn @ThaNarie's suggestions into an issue & then PR.

psimk avatar Feb 21 '22 16:02 psimk