sindresorhus/eslint-plugin-unicorn
Rule proposal: Prefer `URLSearchParams` over `node:querystring` module
Fermée
#1 701 ouverte le 21 janv. 2022
help wantednew rule
Métriques du dépôt
- Stars
- (5 022 étoiles)
- Métriques de merge PR
- (Merge moyen 1j 16h) (399 PRs mergées en 30 j)
Description
Description
The querystring module has been officially deprecated by Node.js for some time. The replacement recommended is URLSearchParams.
An autofix to convert common operations with the querystring module (ex. querystring.stringify) to their URLSearchParams equivalent would be useful as well.
Fail
import ... from 'querystring';
require('querystring');
Pass
// anything else