ng g @co-it/schematics:tsconfig
GregOnNet opened this issue · 3 comments
GregOnNet commented
- Ask to set
"strict": true
- Ask to set
"noUnusedParameters": true
- Ask to set
"noUnusedLocals": true
- Ask to set
"noImplicitAny": true
- Update root
tsconfig.json
accordingly - Add test that checks if the generated tsconfig.json validates against the json schema for tsconfig 🎉
GregOnNet commented
Adding a test that checks if the resulting tsconfig.json
matches the corresponding schema seems to be harder than expected.
I played a bit with https://ajv.js.org but I do not understand the concept of Schema and MetaSchema.
If you run the validator I get the error described here: ajv-validator/ajv#472
GregOnNet commented
I got the schema test to run.
JSON-Schemas build up a hierarchy.
A schema validator validates the whole hierarchy.
If one of the schemas is not available an error is thrown.
Since we only need to validate the properties of tsconfig.json.
I decided to ignore the parent schema of tsconfig.json for now.