Skip to content

Commit

Permalink
Update no-magic-array-flat-depth.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed May 7, 2024
1 parent 53acbfc commit a01d1d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/rules/no-magic-array-flat-depth.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- end auto-generated rule header -->
<!-- Do not manually modify this header. Run: `npm run fix:eslint-docs` -->

When calling [`Array#flat(depth)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) with depth, normally the depth argument should be `1` or `Infinity`(`Number.POSITIVE_INFINITY`), otherwise it should be meaningful variable name or explained with a comment.
When calling [`Array#flat(depth)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) with depth, normally the depth argument should be `1` or `Infinity`(`Number.POSITIVE_INFINITY`), otherwise it should be a meaningful variable name or explained with a comment.

## Fail

Expand Down

0 comments on commit a01d1d6

Please sign in to comment.