openzeppelin-sdk icon indicating copy to clipboard operation
openzeppelin-sdk copied to clipboard

Set up stricter typescript compiler settings

Open spalladino opened this issue 5 years ago • 0 comments

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 .js files.
  • [ ] alwaysStrict: true // Parse Javascript in strict mode.
  • [x] allowJs: false // Stop allowing .js files.
  • [ ] 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 any type.
  • [ ] strictNullChecks: true // null and undefined are 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.

spalladino avatar Dec 11 '19 21:12 spalladino