onsip / SIP.js

A simple, intuitive, and powerful JavaScript signaling library
https://sipjs.com
MIT License
1.88k stars 700 forks source link

Cannot compile 0.21.2 #1019

Open slavikbialik opened 1 year ago

slavikbialik commented 1 year ago

Hi, I'm having an issue to compile the new 0.21.2. When doing npm run build as usual it is saying that there are lots of lint errors, so I'm trying to invoke the lint fix. When running npm run lint-fix I'm getting the following:

D:\Git\SIP.js\src\api\user-agent-options.ts
  52:36  error  Don't use `Function` as a type. The `Function` type accepts any function-like value.
It provides no type safety when calling the function, which can be a common source of bugs.
It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.
If you are expecting the function to accept certain arguments, you should explicitly define the function shape  @typescript-eslint/ban-types

D:\Git\SIP.js\src\core\messages\digest-authentication.ts
  23:30  error  Don't use `Function` as a type. The `Function` type accepts any function-like value.
It provides no type safety when calling the function, which can be a common source of bugs.
It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.
If you are expecting the function to accept certain arguments, you should explicitly define the function shape  @typescript-eslint/ban-types
  46:24  error  Don't use `Function` as a type. The `Function` type accepts any function-like value.
It provides no type safety when calling the function, which can be a common source of bugs.
It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.
If you are expecting the function to accept certain arguments, you should explicitly define the function shape  @typescript-eslint/ban-types

Thanks.

concepteur19 commented 1 year ago

i have the same issue