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

Increase strictness of tsconfig #2255

Open
ansemb opened this issue Jan 22, 2024 · 1 comment
Open

Increase strictness of tsconfig #2255

ansemb opened this issue Jan 22, 2024 · 1 comment

Comments

@ansemb
Copy link

ansemb commented Jan 22, 2024

Is your feature request related to a problem? Please describe.

Currently tsconfig.base.json has quite low strictness, and Typescript is not helping the developer as much as it could.

Also, there is a higher change of bugs arising without this strictness.

I suggest "strict": true and "noUncheckedIndexedAccess": true is added to tsconfig, but there are also some other settings that could be interesting.

Matt Pocock has a good blog post here: https://www.totaltypescript.com/tsconfig-cheat-sheet.

In case this is something that could be added, we should start by updating @jsonforms/core and could afterwards do other packages.

It would require quite a bit of (small) changes several places.

Describe the solution you'd like

packages/core/tsconfig.json:

{
  "compilerOptions": {
    "verbatimModuleSyntax": true,
    /* strictness */
    "strict": true,
    "noUncheckedIndexedAccess": true,
  }
}

see also:

Describe alternatives you've considered

.

Framework

Core

RendererSet

No response

Additional context

No response

@lucas-koehler
Copy link
Contributor

Hi @ansemb, thanks for raising this issue :) I agree that stricter TypeScript settings is desirable. We would certainly accept contributions that improve this for (parts of) the codebase. Generally, it would be nicer if changes can be done directly in the tsconfig.base.json and fixed for all packages. However, that might be too much effort at once. Thus, smaller improvements are certainly welcome, too 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants