sindresorhus/eslint-plugin-unicorn

Rule proposal: Prefer `URLSearchParams` over `node:querystring` module

已关闭

#1,701 创建于 2022年1月21日

 (3 条评论) (2 个反应) (0 位负责人)JavaScript (468 个派生)user submission
help wantednew rule

仓库指标

星标
 (5,022 个星标)
PR 合并指标
 (平均合并 1天 16小时) (30 天内合并 399 个 PR)

描述

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

贡献者指南