* Rename `switch_package_to_release.js` to `.cjs`
Slightly surprisingly, the symlink is enough to make `node
switch_package_to_release.js` work.
* Rename .eslintrc.js to .cjs
Again, declare this as commonjs
* Move `type:module` declaration into package.json.
matrix-js-sdk is built into ECMAScript modules, and we should declare it as
such. See https://nodejs.org/api/packages.html#type. Failure to do so causes
problems for javascript projects attempting to build against matrix-js-sdk: see https://github.com/matrix-org/matrix-js-sdk/issues/4347.
Previously, we did this as part of the package.json switcheroo, but that is
unnecessarily fragile.
matrix-react-sdk, element-web, etc are unaffected by this, because they use the
typescript files directly, by importing `matrix-js-sdk/src/...`.
* Reapply "Add "type" = "module" to ensure it is present (#4350)" (#4352)
This reverts commit 8214fd7156.
* Mark prettier config file as CommonJS
I *think* this will fix a problem with the release process in which we saw an
error:
```
Error: Invalid configuration for file "/home/runner/work/matrix-js-sdk/matrix-js-sdk/package.json":
Error: module is not defined in ES module scope
Error: This file is being treated as an ES module because it has a '.js' file extension and '/home/runner/work/matrix-js-sdk/matrix-js-sdk/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
```