Legacy URL is not deprecated anymore - `node/no-deprecated-api`
It seems that url.parse and others as part of the Legacy URL API are no longer deprecated as of node v14.17.0. I don't believe they should trigger node/no-deprecated-api.
This was specifically an issue in our projects given than url.parse(path) is not the same as new URL(path) when the path is relative. See issues for more:
- https://github.com/whatwg/url/issues/531
- https://github.com/nodejs/node/issues/12682
Still do not think that ppl should use url.parse as it's not as well cross env. friendly.
new URL() exist in every env. url.parse don't (it requires a polyfill)
It's fine if developers/teams decide not to use url.parse as a matter of best practice but the fact remains that it is not actually deprecated and thus should not trigger the no-deprecated-api rule. This is important because new URL() is not a direct replacement for url.parse in certain circumstances (see above) and the no-deprecated-api error forced us to change code that didn't technically need changed for a deprecated function.
eslint-plugin-n is the maintained version of this module.
We switched to it in eg. eslint-config-standard / standard and it is maintained by me and other members of the official ESLint community organization.
Try that module out and if it isn't fixed there, then open a new issue in that project.