Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Document the "correct" way to build an array with values #13246

Merged
merged 2 commits into from May 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/rules/no-array-constructor.md
Expand Up @@ -38,6 +38,12 @@ Array(500)
new Array(someOtherArray.length)
```

```js
edg2s marked this conversation as resolved.
Show resolved Hide resolved
/*eslint no-array-constructor: "error"*/

[0, 1, 2]
```

## When Not To Use It

This rule enforces a nearly universal stylistic concern. That being said, this
Expand Down