openzeppelin-sdk
openzeppelin-sdk copied to clipboard
Set up stricter typescript compiler settings
As originally designed by @ajsantander in #434:
- [ ] sourceMaps: true // Activate source maps and, ideally, try out a debugging workflow. Might need to use the npm dependnecy "source-map-support" to be able to see references to .ts code in transpiled .js output files.
- [x] declaration: true // (not per package, but in the root tsconfig.json)
- [ ] esModuleInterop: false // Disable compatibility with Babel.
- [ ] checkJs: true // Report errors in
.jsfiles. - [ ] alwaysStrict: true // Parse Javascript in strict mode.
- [x] allowJs: false // Stop allowing
.jsfiles. - [ ] noUnusedLocals: true // Report errors on unused locals.
- [ ] noUnusedParameters: true // Report errors on unused parameters.
- [ ] noImplicitReturns: true // Report error when not all code paths in function return a value.
- [ ] noImplicitThis: true //
this.needs to be typed always. - [ ] noImplicitAny: true // No inference of the
anytype. - [ ] strictNullChecks: true //
nullandundefinedare strict types, to be handled by unions. - [ ] strictFuncitonTypes: true // Disable bivariant parameter checking for function types.
- [ ] strictPropertyInitialization: true // Ensure non-undefined class properties are initialized in the constructor.
- [x] noEmitOnError: true // Do not output any Javascript if any error is found.