sindresorhus/eslint-plugin-unicorn
Rule proposal: Prefer `URLSearchParams` over `node:querystring` module
クローズ
#1,701 opened on 2022/01/21
help wantednew rule
Repository metrics
- Stars
- (5,022 個のスター)
- PR merge metrics
- (平均マージ 4h 30m) (30d で 26 merged PRs)
説明
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