Address lint issues.

This commit is contained in:
Nathan Hunzaker
2017-01-06 17:10:41 -05:00
parent 565d63baa6
commit d585590650
5 changed files with 6 additions and 17 deletions
+1 -12
View File
@@ -10,15 +10,6 @@
var REACT_PATH = 'react.js';
var DOM_PATH = 'react-dom.js';
// Patch console.log for IE9
if (typeof console === 'undefined') {
console = {
log: function () {},
warn: function () {},
error: function () {},
}
}
function parseQuery(qstr) {
var query = {};
@@ -41,14 +32,12 @@ if (version !== 'local') {
DOM_PATH = 'https://unpkg.com/react-dom@' + version + '/dist/react-dom.min.js';
}
console.log('Loading ' + version);
document.write('<script src="' + REACT_PATH + '"></script>');
// Versions earlier than 14 do not use ReactDOM
if (version === 'local' || parseFloat(version, 10) > 0.13) {
document.write('<script src="' + DOM_PATH + '"></script>');
} else {
console.log('Aliasing React to ReactDOM for compatability.');
// Aliasing React to ReactDOM for compatability.
document.write('<script>ReactDOM = React</script>');
}
+1 -1
View File
@@ -20,7 +20,7 @@ const FixturesPage = React.createClass({
case '/textareas':
return <TextAreaFixtures />;
default:
return <p>Please select a test fixture.</p>
return <p>Please select a test fixture.</p>;
}
},
});
@@ -5,7 +5,7 @@ const SelectFixture = React.createClass({
return { value: '' };
},
onChange(event) {
this.setState({ value: event.target.value })
this.setState({ value: event.target.value });
},
render() {
return (
@@ -13,7 +13,7 @@ const TextInputFixtures = React.createClass({
let onChange = e => {
let value = e.target.value;
if (type === 'number') {
value = value === '' ? '' : parseFloat(value, 10) || 0
value = value === '' ? '' : parseFloat(value, 10) || 0;
}
this.setState({
[type] : value,
@@ -46,7 +46,7 @@ const TextInputFixtures = React.createClass({
let types = [
'text', 'email', 'number', 'url', 'tel',
'color', 'date', 'datetime-local',
'time', 'month', 'week', 'range', 'password'
'time', 'month', 'week', 'range', 'password',
];
return (
<form onSubmit={event => event.preventDefault()}>
@@ -24,7 +24,7 @@ const TextAreaFixtures = React.createClass({
<div className="container">
<h4>Controlled Output:</h4>
<div className='output'>
<div className="output">
{this.state.value}
</div>
</div>