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

New rule: Disallow spacing between rest and spread operators and their expressions (rest-spread-spacing) #567

Closed
feross opened this issue Jul 13, 2016 · 1 comment

Comments

@feross
Copy link
Member

feross commented Jul 13, 2016

http://eslint.org/docs/rules/rest-spread-spacing

This one should be uncontroversial:

// BAD
fn(... args)
[... arr, 4, 5, 6]
let [a, b, ... arr] = [1, 2, 3, 4, 5]
function fn(... args) { console.log(args) }
let { x, y, ... z } = { x: 1, y: 2, a: 3, b: 4 }
let n = { x, y, ... z }

// GOOD
fn(...args)
[...arr, 4, 5, 6]
let [a, b, ...arr] = [1, 2, 3, 4, 5]
function fn(...args) { console.log(args) }
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }
let n = { x, y, ...z }
@feross feross added this to the v8 milestone Jul 13, 2016
@feross
Copy link
Member Author

feross commented Jul 13, 2016

No test failures at all on this one, and it's pretty obvious, so I'm just going to merge straight away so it can go into the standard v8 RC 👍

1..424
# tests 424
# pass  424

# ok

Collaborators/community folks, let me know if you disagree or have thoughts.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

1 participant