Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-8169

Test everything by default in tsconfig.json, add a tsconfig-build.json, remove tsconfig-lint.json

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Testing
    • None
    • 3
    • Developer Tools

      There's this issue in vscode's eslint plugin where it picks up our .eslintrc.js file and the .eslintrc.js file specifies tsconfig-lint.json as the ts config file, but vscode uses tsconfig.json anyway.

       

      tsconfig.json ignores tests as an optimisation and tsconfig-lint.json then overrides that.

       

      One way to get around this is to "invert" it of sorts: have tsconfig.json check everything including tests and have a tsconfig-build.json that overrides the included files to skip tests. Then when we compile we'd use tsconfig-build.json.

       

      Then we should see all the errors in our tests show up in vscode.

       

      Reasoning: We accidentally didn't typecheck a bunch of packages. One of those (at the time of writing) is packages/connection-form. Once I turned on typecheck there were 131 errors in 18 files. But vscode wouldn't highlight those errors which makes it a pain to find and fix them all because you can only see them on the CLI.

      And that's just one package we skipped..

            Assignee:
            Unassigned Unassigned
            Reporter:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: