Skip to content

Commit

Permalink
fix(eslint): using eslint.config.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
lambiengcode committed Apr 28, 2024
1 parent 2f02eef commit b5aafaa
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 36 deletions.
27 changes: 0 additions & 27 deletions .eslintrc.js

This file was deleted.

19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default [
{ files: ['**/*.js'], languageOptions: { sourceType: 'commonjs' } },
{ languageOptions: { globals: globals.browser } },
...tseslint.configs.recommended,
{
files: ['**/*.ts'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
},
];
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@
"@types/supertest": "^6.0.2",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"eslint": "^9.1.0",
"eslint": "^9.1.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"globals": "^15.0.0",
"jest": "^29.7.0",
"npm-check-updates": "^16.14.18",
"prettier": "^3.2.5",
Expand All @@ -77,7 +78,8 @@
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.4.5"
"typescript": "^5.4.5",
"typescript-eslint": "^7.7.1"
},
"jest": {
"moduleFileExtensions": [
Expand Down
2 changes: 1 addition & 1 deletion src/infrastructure/services/sfu/entities/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class Media {
}

removeAllTracks() {
for (let track of this.tracks) {
for (const track of this.tracks) {
track.stop();
}

Expand Down
4 changes: 2 additions & 2 deletions src/infrastructure/services/sfu/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ export class Room {

if (!peerIds) return;

for (let peerId of peerIds) {
let pc: PeerConnection = this.subscribers[peerId];
for (const peerId of peerIds) {
const pc: PeerConnection = this.subscribers[peerId];
pc.addTrack(track);
}
}
Expand Down
108 changes: 104 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1927,6 +1927,23 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/eslint-plugin@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz#50a9044e3e5fe76b22caf64fb7fc1f97614bdbfd"
integrity sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==
dependencies:
"@eslint-community/regexpp" "^4.10.0"
"@typescript-eslint/scope-manager" "7.7.1"
"@typescript-eslint/type-utils" "7.7.1"
"@typescript-eslint/utils" "7.7.1"
"@typescript-eslint/visitor-keys" "7.7.1"
debug "^4.3.4"
graphemer "^1.4.0"
ignore "^5.3.1"
natural-compare "^1.4.0"
semver "^7.6.0"
ts-api-utils "^1.3.0"

"@typescript-eslint/eslint-plugin@^7.7.0":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz#bf34a02f221811505b8bf2f31060c8560c1bb0a3"
Expand All @@ -1944,6 +1961,17 @@
semver "^7.6.0"
ts-api-utils "^1.3.0"

"@typescript-eslint/parser@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.7.1.tgz#f940e9f291cdca40c46cb75916217d3a42d6ceea"
integrity sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==
dependencies:
"@typescript-eslint/scope-manager" "7.7.1"
"@typescript-eslint/types" "7.7.1"
"@typescript-eslint/typescript-estree" "7.7.1"
"@typescript-eslint/visitor-keys" "7.7.1"
debug "^4.3.4"

"@typescript-eslint/parser@^7.7.0":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.7.0.tgz#6b1b3ce76c5de002c43af8ae933613b0f2b4bcc6"
Expand All @@ -1963,6 +1991,14 @@
"@typescript-eslint/types" "7.7.0"
"@typescript-eslint/visitor-keys" "7.7.0"

"@typescript-eslint/scope-manager@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz#07fe59686ca843f66e3e2b5c151522bc38effab2"
integrity sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==
dependencies:
"@typescript-eslint/types" "7.7.1"
"@typescript-eslint/visitor-keys" "7.7.1"

"@typescript-eslint/type-utils@7.7.0":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz#36792ff4209a781b058de61631a48df17bdefbc5"
Expand All @@ -1973,11 +2009,26 @@
debug "^4.3.4"
ts-api-utils "^1.3.0"

"@typescript-eslint/type-utils@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz#2f8094edca3bebdaad009008929df645ed9c8743"
integrity sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==
dependencies:
"@typescript-eslint/typescript-estree" "7.7.1"
"@typescript-eslint/utils" "7.7.1"
debug "^4.3.4"
ts-api-utils "^1.3.0"

"@typescript-eslint/types@7.7.0":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.0.tgz#23af4d24bf9ce15d8d301236e3e3014143604f27"
integrity sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==

"@typescript-eslint/types@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.1.tgz#f903a651fb004c75add08e4e9e207f169d4b98d7"
integrity sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==

"@typescript-eslint/typescript-estree@7.7.0":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz#b5dd6383b4c6a852d7b256a37af971e8982be97f"
Expand All @@ -1992,6 +2043,20 @@
semver "^7.6.0"
ts-api-utils "^1.3.0"

"@typescript-eslint/typescript-estree@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz#5cafde48fe390fe1c1b329b2ce0ba8a73c1e87b2"
integrity sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==
dependencies:
"@typescript-eslint/types" "7.7.1"
"@typescript-eslint/visitor-keys" "7.7.1"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
minimatch "^9.0.4"
semver "^7.6.0"
ts-api-utils "^1.3.0"

"@typescript-eslint/utils@7.7.0":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.0.tgz#3d2b6606a60ac34f3c625facfb3b3ab7e126f58d"
Expand All @@ -2005,6 +2070,19 @@
"@typescript-eslint/typescript-estree" "7.7.0"
semver "^7.6.0"

"@typescript-eslint/utils@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.1.tgz#5d161f2b4a55e1bc38b634bebb921e4bd4e4a16e"
integrity sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==
dependencies:
"@eslint-community/eslint-utils" "^4.4.0"
"@types/json-schema" "^7.0.15"
"@types/semver" "^7.5.8"
"@typescript-eslint/scope-manager" "7.7.1"
"@typescript-eslint/types" "7.7.1"
"@typescript-eslint/typescript-estree" "7.7.1"
semver "^7.6.0"

"@typescript-eslint/visitor-keys@7.7.0":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz#950148cf1ac11562a2d903fdf7acf76714a2dc9e"
Expand All @@ -2013,6 +2091,14 @@
"@typescript-eslint/types" "7.7.0"
eslint-visitor-keys "^3.4.3"

"@typescript-eslint/visitor-keys@7.7.1":
version "7.7.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz#da2294796220bb0f3b4add5ecbb1b9c3f4f65798"
integrity sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==
dependencies:
"@typescript-eslint/types" "7.7.1"
eslint-visitor-keys "^3.4.3"

"@wasm-audio-decoders/common@9.0.4":
version "9.0.4"
resolved "https://registry.yarnpkg.com/@wasm-audio-decoders/common/-/common-9.0.4.tgz#0c2a98c67ab048e3a917365685de87141f4533a8"
Expand Down Expand Up @@ -3615,10 +3701,10 @@ eslint-visitor-keys@^4.0.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb"
integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==

eslint@^9.1.0:
version "9.1.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.1.0.tgz#262625f6b0921f7550f128a0098d05ecaad989c6"
integrity sha512-1TCBecGFQtItia2o39P7Z4BK1X7ByNPxAiWJvwiyTGcOwYnTiiASgMpNA6a+beu8cFPhEDWvPf6mIlYUJv6sgA==
eslint@^9.1.1:
version "9.1.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.1.1.tgz#39ec657ccd12813cb4a1dab2f9229dcc6e468271"
integrity sha512-b4cRQ0BeZcSEzPpY2PjFY70VbO32K7BStTGtBsnIGdTSEEQzBi8hPBcGQmTG2zUvFr9uLe0TK42bw8YszuHEqg==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
"@eslint-community/regexpp" "^4.6.1"
Expand Down Expand Up @@ -4322,6 +4408,11 @@ globals@^14.0.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e"
integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==

globals@^15.0.0:
version "15.0.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-15.0.0.tgz#9c6cd4e54327ceaab563b4c17ee5e9d181c03fd2"
integrity sha512-m/C/yR4mjO6pXDTm9/R/SpYTAIyaUB4EOzcaaMEl7mds7Mshct9GfejiJNQGjHHbdMPey13Kpu4TMbYi9ex1pw==

globby@^11.0.4, globby@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
Expand Down Expand Up @@ -7980,6 +8071,15 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==

typescript-eslint@^7.7.1:
version "7.7.1"
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-7.7.1.tgz#16f82e83bb0955af02f258cb7a9de59e1bfb8706"
integrity sha512-ykEBfa3xx3odjZy6GRED4SCPrjo0rgHwstLlEgLX4EMEuv7QeIDSmfV+S6Kk+XkbsYn4BDEcPvsci1X26lRpMQ==
dependencies:
"@typescript-eslint/eslint-plugin" "7.7.1"
"@typescript-eslint/parser" "7.7.1"
"@typescript-eslint/utils" "7.7.1"

typescript@5.3.3:
version "5.3.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
Expand Down

0 comments on commit b5aafaa

Please sign in to comment.