Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Docs: add rule comment in prefer-rest-params doc (#13191)
  • Loading branch information
yeonjuan committed Apr 18, 2020
1 parent ffaa4ba commit b398e0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/rules/prefer-rest-params.md
Expand Up @@ -14,6 +14,8 @@ This rule is aimed to flag usage of `arguments` variables.
Examples of **incorrect** code for this rule:

```js
/*eslint prefer-rest-params: "error"*/

function foo() {
console.log(arguments);
}
Expand All @@ -32,6 +34,8 @@ function foo(action) {
Examples of **correct** code for this rule:

```js
/*eslint prefer-rest-params: "error"*/

function foo(...args) {
console.log(args);
}
Expand Down

0 comments on commit b398e0b

Please sign in to comment.