Skip to content

Commit 51be232

Browse files
jackharrhymysticatea
authored andcommitted
Docs: fix url-search-params documentation (#132)
1 parent ef0f103 commit 51be232

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/rules/prefer-global/url-search-params.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# enforce either `URLSearchParams` or `require("url").URLSearchParams` (prefer-global/url)
1+
# enforce either `URLSearchParams` or `require("url").URLSearchParams` (prefer-global/url-search-params)
22

33
The `URLSearchParams` class of `url` module is defined as a global variable.
44

@@ -18,7 +18,7 @@ This rule has a string option.
1818

1919
```json
2020
{
21-
"node/prefer-global/url": ["error", "always" | "never"]
21+
"node/prefer-global/url-search-params": ["error", "always" | "never"]
2222
}
2323
```
2424

@@ -30,7 +30,7 @@ This rule has a string option.
3030
Examples of :-1: **incorrect** code for this rule:
3131

3232
```js
33-
/*eslint node/prefer-global/url: [error]*/
33+
/*eslint node/prefer-global/url-search-params: [error]*/
3434

3535
const { URLSearchParams } = require("url")
3636
const u = new URLSearchParams(s)
@@ -39,7 +39,7 @@ const u = new URLSearchParams(s)
3939
Examples of :+1: **correct** code for this rule:
4040

4141
```js
42-
/*eslint node/prefer-global/url: [error]*/
42+
/*eslint node/prefer-global/url-search-params: [error]*/
4343

4444
const u = new URLSearchParams(s)
4545
```
@@ -49,15 +49,15 @@ const u = new URLSearchParams(s)
4949
Examples of :-1: **incorrect** code for the `"never"` option:
5050

5151
```js
52-
/*eslint node/prefer-global/url: [error, never]*/
52+
/*eslint node/prefer-global/url-search-params: [error, never]*/
5353

5454
const u = new URLSearchParams(s)
5555
```
5656

5757
Examples of :+1: **correct** code for the `"never"` option:
5858

5959
```js
60-
/*eslint node/prefer-global/url: [error, never]*/
60+
/*eslint node/prefer-global/url-search-params: [error, never]*/
6161

6262
const { URLSearchParams } = require("url")
6363
const u = new URLSearchParams(s)

0 commit comments

Comments
 (0)