@@ -1374,24 +1374,24 @@ ruleTester.run('no-unused-prop-types', rule, {
1374
1374
'};'
1375
1375
] . join ( '\n' )
1376
1376
} , {
1377
- // Destructured props in the `shouldComponentUpdate` method shouldn't throw errors
1378
1377
code : [
1378
+ '// Destructured props in the `shouldComponentUpdate` method shouldn’t throw errors' ,
1379
1379
'class Hello extends Component {' ,
1380
1380
' static propTypes = {' ,
1381
1381
' something: PropTypes.bool' ,
1382
1382
' }' ,
1383
- ' shouldComponentUpdate (nextProps, nextState) {' ,
1383
+ ' shouldComponentUpdate(nextProps, nextState) {' ,
1384
1384
' const {something} = nextProps;' ,
1385
1385
' return something;' ,
1386
1386
' }' ,
1387
1387
'}'
1388
1388
] . join ( '\n' ) ,
1389
1389
parser : parsers . BABEL_ESLINT
1390
1390
} , {
1391
- // Destructured props in the `shouldComponentUpdate` method shouldn't throw errors
1392
1391
code : [
1392
+ '// Destructured props in the `shouldComponentUpdate` method shouldn’t throw errors' ,
1393
1393
'class Hello extends Component {' ,
1394
- ' shouldComponentUpdate (nextProps, nextState) {' ,
1394
+ ' shouldComponentUpdate(nextProps, nextState) {' ,
1395
1395
' const {something} = nextProps;' ,
1396
1396
' return something;' ,
1397
1397
' }' ,
@@ -1401,13 +1401,13 @@ ruleTester.run('no-unused-prop-types', rule, {
1401
1401
'};'
1402
1402
] . join ( '\n' )
1403
1403
} , {
1404
- // Destructured props in `shouldComponentUpdate` shouldn't throw errors when used createReactClass
1405
1404
code : [
1405
+ '// Destructured props in `shouldComponentUpdate` shouldn’t throw errors when used with createReactClass' ,
1406
1406
'var Hello = createReactClass({' ,
1407
1407
' propTypes: {' ,
1408
1408
' something: PropTypes.bool,' ,
1409
1409
' },' ,
1410
- ' shouldComponentUpdate (nextProps, nextState) {' ,
1410
+ ' shouldComponentUpdate(nextProps, nextState) {' ,
1411
1411
' const {something} = nextProps;' ,
1412
1412
' return something;' ,
1413
1413
' }' ,
@@ -1868,8 +1868,8 @@ ruleTester.run('no-unused-prop-types', rule, {
1868
1868
parser : parsers . BABEL_ESLINT
1869
1869
} , {
1870
1870
code : [
1871
- 'class Hello extends Component {' ,
1872
- ' shouldComponentUpdate (props) {' ,
1871
+ 'class HelloFooBar extends Component {' ,
1872
+ ' shouldComponentUpdate(props) {' ,
1873
1873
' if (props.foo) {' ,
1874
1874
' return true;' ,
1875
1875
' }' ,
@@ -1879,7 +1879,7 @@ ruleTester.run('no-unused-prop-types', rule, {
1879
1879
' return (<div>{this.props.bar}</div>);' ,
1880
1880
' }' ,
1881
1881
'}' ,
1882
- 'Hello .propTypes = {' ,
1882
+ 'HelloFooBar .propTypes = {' ,
1883
1883
' foo: PropTypes.string,' ,
1884
1884
' bar: PropTypes.string,' ,
1885
1885
'};'
0 commit comments