typescript:S1874: 'fileSaver' is deprecated. use `{ autoBom: false }` as the third argument

  • ALM used: GitHub
  • CI system used: Jenkins

The code

            { autoBom: false },

triggers the typescript:S1874, even though {autoBom: false} is used

Hi Lrozenblyum,

Could you provide a reproducer for your issue? What is the fileSaver object that you are referring to?



  1. I’ll try to create a reproducer but it might take some time
  2. The fileSaver is received in the import section:
    import * as fileSaver from 'file-saver';
    Our package.json contains this dependency:
    "file-saver": "^2.0.5"

Hi @lrozenblyum,

I can reproduce this FP. We have created an issue to track this problem: Fix FP S1874 (`deprecation`): `'fileSaver' is deprecated. use `{ autoBom: false }` as the third argument` · Issue #3862 · SonarSource/SonarJS · GitHub

Thank you for notifying us.

Best Regards,

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.