Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Docs: fix url-search-params documentation (#132)
  • Loading branch information
jackharrhy authored and mysticatea committed Jul 27, 2018
1 parent ef0f103 commit 51be232
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/rules/prefer-global/url-search-params.md
@@ -1,4 +1,4 @@
# enforce either `URLSearchParams` or `require("url").URLSearchParams` (prefer-global/url)
# enforce either `URLSearchParams` or `require("url").URLSearchParams` (prefer-global/url-search-params)

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

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

```json
{
"node/prefer-global/url": ["error", "always" | "never"]
"node/prefer-global/url-search-params": ["error", "always" | "never"]
}
```

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

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

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

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

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

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

const u = new URLSearchParams(s)
```

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

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

const { URLSearchParams } = require("url")
const u = new URLSearchParams(s)
Expand Down

0 comments on commit 51be232

Please sign in to comment.