eclipsesource / eclipsesource/jsonforms
Increase strictness of `tsconfig`
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.7k
- Forks
- 424
- Ø Merge
- 17 T. 8 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
### 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](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`:
```jsonc
{
"compilerOptions": {
"verbatimModuleSyntax": true,
/* strictness */
"strict": true,
"noUncheckedIndexedAccess": true,
}
}
```
see also:
- [strict](https://www.typescriptlang.org/tsconfig#strict)
- [noUncheckedIndexedAccess](https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess)
### Describe alternatives you've considered
.
### Framework
Core
### RendererSet
_No response_
### Additional context
_No response_
Beitragsleitfaden
Rechercherichtung
Beginne mit dem Lesen von tsconfig.base.json und packages/core/tsconfig.json und konzentriere dich dabei auf die vorgeschlagenen Strictness-Optionen für @jsonforms/core. Überprüfe die TypeScript-Fehler, die nach dem Aktivieren von strict und noUncheckedIndexedAccess erzeugt werden, und nimm anschließend die erforderlichen kleinen Änderungen im gesamten Paket vor. Als erledigt gilt die Aufgabe, wenn das Core-Paket mit beiden aktivierten Optionen fehlerfrei erstellt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- build-system, developer-experience
- Issue-Typ
- Refactoring
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100