FlowCrypt / flowcrypt-browser

FlowCrypt Browser extension for Chrome and Firefox
https://flowcrypt.com
Other
373 stars 46 forks source link

Fix 'typescript-eslint/no-deprecated' errors #5822

Closed sosnovsky closed 1 month ago

sosnovsky commented 2 months ago

typescript-eslint added new rule no-deprecated, it'll be useful for finding and updating all usages of deprecated methods in our code.

It found around 160 deprecation errors - https://flowcrypt.semaphoreci.com/jobs/4d93845e-1561-4254-a759-2ff804ade7c9

ioanmo226 commented 2 months ago

For reference

A real-world example of this is in the @types/chrome package, which provides typing for browser-specific APIs exposed by Chrome for use in Chrome Apps and Chrome Extensions. There are a bunch of specific APIs that are deprecated, such as:

/**

  • @deprecated Part of the deprecated Chrome Apps platform */ declare namespace chrome.socket { // ... } But this results in the linter raising a @typescript-eslint/no-deprecated at every usage site of chrome (not just chrome.socket - also other things like chrome.tabs, chrome.runtime, etc, which aren't deprecated).

https://github.com/typescript-eslint/typescript-eslint/issues/9902#issue-2493189703