diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 7e70255af37..3147d878f75 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,5 +1,5 @@ module.exports = { - plugins: ["matrix-org", "import", "jsdoc"], + plugins: ["matrix-org", "import", "jsdoc", "node"], extends: ["plugin:matrix-org/babel", "plugin:matrix-org/jest", "plugin:import/typescript"], parserOptions: { project: ["./tsconfig.json"], @@ -128,6 +128,14 @@ module.exports = { // These need a bit more work before we can enable // "jsdoc/check-param-names": "error", // "jsdoc/check-indentation": "error", + // Ensure .ts extension on imports outside of tests + "node/file-extension-in-import": [ + "error", + "always", + { + tryExtensions: [".ts"], + }, + ], }, }, { diff --git a/package.json b/package.json index 6680f069d34..b9132f43e2b 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,7 @@ "eslint-plugin-jest": "^28.0.0", "eslint-plugin-jsdoc": "^50.0.0", "eslint-plugin-matrix-org": "^1.0.0", + "eslint-plugin-node": "^11.1.0", "eslint-plugin-tsdoc": "^0.3.0", "eslint-plugin-unicorn": "^55.0.0", "fake-indexeddb": "^5.0.2", diff --git a/src/client.ts b/src/client.ts index 6746e505bcd..9f1682a8af8 100644 --- a/src/client.ts +++ b/src/client.ts @@ -2254,6 +2254,8 @@ export class MatrixClient extends TypedEventEmitter= 2.1.2 < 3.0.0" -ignore@^5.1.8, ignore@^5.2.0, ignore@^5.3.1: +ignore@^5.1.1, ignore@^5.1.8, ignore@^5.2.0, ignore@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== @@ -5436,6 +5468,11 @@ regexparam@^3.0.0: resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-3.0.0.tgz#1673e09d41cb7fd41eaafd4040a6aa90daa0a21a" integrity sha512-RSYAtP31mvYLkAHrOlh25pCNQ5hWnT106VukGaaFfuJrZFkGRX5GhUAdPqpSDXxOhA2c4akmRuplv1mRqnBn6Q== +regexpp@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + regexpu-core@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" @@ -5504,7 +5541,7 @@ resolve.exports@^2.0.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4, resolve@~1.22.2: +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4, resolve@~1.22.2: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -5604,7 +5641,7 @@ sdp-transform@^2.14.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.3.0, semver@^6.3.1: +semver@^6.1.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==