• 
      

    Fix and improve configuration for Review Board JavaScript/TypeScript.

    Review Request #12791 — Created Jan. 20, 2023 and submitted — Latest diff uploaded

    Information

    Review Board
    release-6.x

    Reviewers

    This makes a few adjustments and improvements to our recently-added
    configuration:

    • Decorators are now available. This uses Babel's "legacy" decorators,
      which just wrap the decorated item in a function call, as that's
      actually what TC39 recommends currently (the modern specs are too much
      in flux). This will be needed for Spina.

    • Improved our "globals" configuration for imports so that an import
      from, say, "jquery" will transpile to just using the $ namespace.
      This exists for all the modules we have registered as globals. This
      allows us to either import from the modules (recommended) or access
      the namespaces directly (allowed but should be legacy).

    • The TypeScript compiler no longer emits JavaScript or declaration
      files. This was polluting our tree. We'll eventually want to enable
      type declaration files, but not today.

    • Several TypeScript options were turned on to enable better Babel
      interoperability.

    Verified I could compile TypeScript and JavaScript.

    Commits

    Files