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

Add rule to warn about sparse array literals #313

Open
ajafff opened this issue Jun 21, 2018 · 1 comment
Open

Add rule to warn about sparse array literals #313

ajafff opened this issue Jun 21, 2018 · 1 comment

Comments

@ajafff
Copy link
Member

ajafff commented Jun 21, 2018

[, 1, 2]; // empty element at start
[1,, 2]; // empty element in the middle
[1, 2,,]; // empty element at the end
[1, 2,]; // OK

// no errors on destructuring assignment
[,a,,b,,c,,] = arr;
@ajafff
Copy link
Member Author

ajafff commented Jul 27, 2018

For the record: those errors on destructuring assignment will be part of no-useless-destructuring proposed in #325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant