Skip to content

Commit

Permalink
Docs: add rule comment in prefer-rest-params doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjuan committed Apr 18, 2020
1 parent ffaa4ba commit ed2397e
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 ed2397e

Please sign in to comment.