Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

ng g @co-it/schematics:tsconfig #2

Closed
6 tasks done
GregOnNet opened this issue Mar 7, 2019 · 3 comments
Closed
6 tasks done

ng g @co-it/schematics:tsconfig #2

GregOnNet opened this issue Mar 7, 2019 · 3 comments
Assignees

Comments

@GregOnNet
Copy link
Contributor

GregOnNet commented Mar 7, 2019

  • 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 GregOnNet self-assigned this Mar 7, 2019
@GregOnNet
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

@GregOnNet
Copy link
Contributor Author

Done with #6

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

No branches or pull requests

1 participant