Commit a8387b9 1 parent ead83c2 commit a8387b9 Copy full SHA for a8387b9
File tree 6 files changed +9
-19
lines changed
6 files changed +9
-19
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "presets" : [ "env" , "react" ] ,
3
- "plugins" : [ "transform-object-rest-spread " , "transform-class-properties " ]
2
+ "presets" : [ "@babel/ env" , "@babel/ react" ] ,
3
+ "plugins" : [ "@babel/plugin-proposal-class-properties " , "@babel/plugin-proposal-object-rest-spread " ]
4
4
}
Original file line number Diff line number Diff line change 29
29
"keywords" : [],
30
30
"author" :
" stereobooster <[email protected] >" ,
31
31
"license" : " MIT" ,
32
- "dependencies" : {},
33
32
"peerDependencies" : {
34
33
"prop-types" : " >=15" ,
35
34
"react" : " >=0.14.x" ,
36
35
"react-waypoint" : " >=8.0.0"
37
36
},
38
37
"devDependencies" : {
39
38
"@types/react" : " 16.4.13" ,
40
- "babel-loader" : " 8.0.2 " ,
41
- "babel- plugin-transform -class-properties" : " 6.24.1 " ,
42
- "babel- plugin-transform -object-rest-spread" : " 6.26 .0" ,
43
- "babel- preset-env" : " 1.7 .0" ,
44
- "babel- preset-react" : " 6.24.1 " ,
39
+ "babel-loader" : " 7.1.5 " ,
40
+ "@ babel/ plugin-proposal -class-properties" : " ^7.1.0 " ,
41
+ "@ babel/ plugin-proposal -object-rest-spread" : " ^7.0 .0" ,
42
+ "@ babel/ preset-env" : " ^7.1 .0" ,
43
+ "@ babel/ preset-react" : " ^7.0.0 " ,
45
44
"gh-pages" : " 1.2.0" ,
46
45
"jest-canvas-mock" : " 1.1.0" ,
47
46
"kcd-scripts" : " 0.45.0" ,
Original file line number Diff line number Diff line change 2
2
3
3
exports [` IdealImage Renders a snapshot that is good 1` ] = `
4
4
<div
5
- className = { undefined }
6
5
onClick = { [Function ]}
7
6
onKeyPress = { [Function ]}
8
7
style = {
@@ -12,9 +11,7 @@ exports[`IdealImage Renders a snapshot that is good 1`] = `
12
11
}
13
12
>
14
13
<svg
15
- className = { undefined }
16
14
height = { 2095 }
17
- style = { undefined }
18
15
width = { 3500 }
19
16
/>
20
17
</div >
Original file line number Diff line number Diff line change 2
2
3
3
exports [` Download icon Should render a snapshot that is good 1` ] = `
4
4
<svg
5
- className = { undefined }
6
5
height = { 24 }
7
6
viewBox = " 0 0 24 24"
8
7
width = { 24 }
@@ -21,7 +20,6 @@ exports[`Download icon Should render a snapshot that is good 1`] = `
21
20
22
21
exports [` Loading icon Should render a snapshot that is good 1` ] = `
23
22
<svg
24
- className = { undefined }
25
23
height = { 24 }
26
24
viewBox = " 0 0 24 24"
27
25
width = { 24 }
@@ -40,7 +38,6 @@ exports[`Loading icon Should render a snapshot that is good 1`] = `
40
38
41
39
exports [` Offline icon Should render a snapshot that is good 1` ] = `
42
40
<svg
43
- className = { undefined }
44
41
height = { 24 }
45
42
viewBox = " 0 0 24 24"
46
43
width = { 24 }
@@ -59,7 +56,6 @@ exports[`Offline icon Should render a snapshot that is good 1`] = `
59
56
60
57
exports [` Warning icon Should render a snapshot that is good 1` ] = `
61
58
<svg
62
- className = { undefined }
63
59
height = { 24 }
64
60
viewBox = " 0 0 24 24"
65
61
width = { 24 }
Original file line number Diff line number Diff line change 2
2
3
3
exports [` IdealImageWithDefaults Renders a snapshot that is good 1` ] = `
4
4
<div
5
- className = { undefined }
6
5
onClick = { [Function ]}
7
6
onKeyPress = { [Function ]}
8
7
style = {
@@ -15,7 +14,6 @@ exports[`IdealImageWithDefaults Renders a snapshot that is good 1`] = `
15
14
}
16
15
>
17
16
<svg
18
- className = { undefined }
19
17
height = { 2095 }
20
18
style = {
21
19
Object {
Original file line number Diff line number Diff line change @@ -310,14 +310,14 @@ export default class IdealImage extends Component {
310
310
srcSet : this . props . srcSet ,
311
311
maxImageWidth :
312
312
this . props . srcSet . length > 1
313
- ? guessMaxImageWidth ( this . state . dimensions )
313
+ ? guessMaxImageWidth ( this . state . dimensions ) // eslint-disable-line react/no-access-state-in-setstate
314
314
: 0 ,
315
315
supportsWebp,
316
316
} )
317
317
const { getUrl} = this . props
318
318
const url = getUrl ? getUrl ( pickedSrc ) : pickedSrc . src
319
319
const shouldAutoDownload = this . props . shouldAutoDownload ( {
320
- ...this . state ,
320
+ ...this . state , // eslint-disable-line react/no-access-state-in-setstate
321
321
size : pickedSrc . size ,
322
322
} )
323
323
this . setState ( { pickedSrc, shouldAutoDownload, url} )
You can’t perform that action at this time.
0 commit comments