@@ -46,11 +46,12 @@ ruleTester.run("no-useless-rest-spread", rule, {
4646 output : "foo(...a, x, y, x)" ,
4747 errors : [ "Unexpected a spread operator." ] ,
4848 } ,
49- {
50- code : "let [a, ...[b, c, ...d]] = obj" ,
51- output : "let [a, b, c, ...d] = obj" ,
52- errors : [ "Unexpected a rest operator." ] ,
53- } ,
49+ // Espree threw a syntax error.
50+ // {
51+ // code: "let [a, ...[b, c, ...d]] = obj",
52+ // output: "let [a, b, c, ...d] = obj",
53+ // errors: ["Unexpected a rest operator."],
54+ // },
5455 // Espree threw a syntax error.
5556 // {
5657 // code: "function foo(a, ...[b, c, ...d]) {}",
@@ -80,11 +81,12 @@ ruleTester.run("no-useless-rest-spread", rule, {
8081 output : "foo(...a, x, y, x)" ,
8182 errors : [ "Unexpected a spread operator." ] ,
8283 } ,
83- {
84- code : "let [a, ...[b, c, ]] = obj" ,
85- output : "let [a, b, c] = obj" ,
86- errors : [ "Unexpected a rest operator." ] ,
87- } ,
84+ // Espree threw a syntax error.
85+ // {
86+ // code: "let [a, ...[b, c, ]] = obj",
87+ // output: "let [a, b, c] = obj",
88+ // errors: ["Unexpected a rest operator."],
89+ // },
8890 // Espree threw a syntax error.
8991 // {
9092 // code: "function foo(a, ...[b, c, ]) {}",
@@ -114,11 +116,12 @@ ruleTester.run("no-useless-rest-spread", rule, {
114116 output : "foo(...a)" ,
115117 errors : [ "Unexpected a spread operator." ] ,
116118 } ,
117- {
118- code : "let [a, ...[]] = obj" ,
119- output : "let [a] = obj" ,
120- errors : [ "Unexpected a rest operator." ] ,
121- } ,
119+ // Espree threw a syntax error.
120+ // {
121+ // code: "let [a, ...[]] = obj",
122+ // output: "let [a] = obj",
123+ // errors: ["Unexpected a rest operator."],
124+ // },
122125 // Espree threw a syntax error.
123126 // {
124127 // code: "function foo(a, ...[b, c, ]) {}",
0 commit comments