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

貢獻者指南