-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
comma-spacing conflicts with array-bracket-spacing #3392
Comments
Not sure you really want to ignore null elements - you'd still want the extra space after, correct? |
@nzakas You are right, maybe we can just ignore the check for leading extra space of |
@lo1tuma I actually ended up filtering out the |
@gyandeeps Not sure if we need to filter |
Fix: ignore leading space check for `null` elements in comma-spacing (fixes #3392)
Problem description
Given the following config
and the following code:
then the
comma-spacing
rule warns about an extra space before to first comma in the destructuring statement.when I remove the leading whitespace
then the
array-bracket-spacing
rule warns about a missing space after the opening bracketSame problem exist for array literals:
I’m using ESLint version 1.1.0
Possible solution
I suggest that the
comma-spacing
rule should ignorenull
elements of anArrayExpression
orArrayPattern
.The text was updated successfully, but these errors were encountered: