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 null avoidance in rule require-optimization #1621

Merged
merged 1 commit into from Dec 22, 2017

Conversation

kamataryo
Copy link
Contributor

Hello, thanks for the great ESLint rule.

This is an error report.
When the rule require-optimization encounters arrays with empty items as values in object (ex. { const obj = { prop: [,,,,,] } }), an error rises.

This PR provides null avoidance, simply.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sparse arrays are a horrific practice that massively slows down your code and should never be used, but it's definitely good that this plugin doesn't crash on them.

@ljharb ljharb added the bug label Dec 22, 2017
@ljharb ljharb merged commit 5f1ec80 into jsx-eslint:master Dec 22, 2017
This was referenced Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants