File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ const tests = {
4646 } ,
4747 {
4848 code : `
49- import React from 'react';
49+ import React from 'react'
5050 function useColor() {
5151 const [color, setColor] = React.useState()
5252 return [color, setColor]
@@ -150,14 +150,15 @@ const tests = {
150150 ` ,
151151 features : [ 'ts' ] ,
152152 } ,
153+ ] ) ,
154+ invalid : parsers . all ( [
153155 {
154156 code : `
155157 import { useState } from 'react';
156- const result = useState();
158+ const result = useState()
157159 ` ,
160+ errors : [ { message : 'useState call is not destructured into value + setter pair' } ] ,
158161 } ,
159- ] ) ,
160- invalid : parsers . all ( [
161162 {
162163 code : `
163164 import { useState } from 'react';
@@ -435,7 +436,7 @@ const tests = {
435436 {
436437 code : `
437438 import { useState } from 'react'
438- const [color, setFlavor, extraneous] = useState();
439+ const [color, setFlavor, extraneous] = useState()
439440 ` ,
440441 errors : [
441442 {
@@ -444,7 +445,7 @@ const tests = {
444445 {
445446 output : `
446447 import { useState } from 'react'
447- const [color, setColor] = useState();
448+ const [color, setColor] = useState()
448449 ` ,
449450 } ,
450451 ] ,
You can’t perform that action at this time.
0 commit comments