Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Run --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Soreine committed Feb 6, 2017
1 parent c28d3e1 commit 2cd95e9
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const path = require('path');

function moduleContainer(mod) {
const pkgPath = require.resolve(mod+'/package.json');
const pkgPath = require.resolve(mod + '/package.json');
return path.resolve(
path.dirname(pkgPath)
, '..');
Expand Down
6 changes: 3 additions & 3 deletions pages/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const LOGOS = [
];

const OCTICONS = Icon.OCTICONS
.map(id => {
.map((id) => {
return {
source: `<Icon id="${id}" />`,
component: () => <span style={{ fontSize: 32 }}><Icon id={id} size="md" /></span>
Expand All @@ -42,12 +42,12 @@ const IconsSet = React.createClass({

render() {
const { icons, perLine } = this.props;
let lines = [];
const lines = [];

while (icons.length > 0) {
const cells = icons.splice(0, perLine);
lines.push(<Row>
{cells.map(cell => {
{cells.map((cell) => {
return (
<Row.Col md={12 / perLine}>
<Panel>
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const iconsFolder = path.resolve(__dirname, '../icons');
const icons = fs.readdirSync(iconsFolder);

// Convert icons
icons.forEach(icon => {
icons.forEach((icon) => {
const ext = path.extname(icon);
if (ext != '.svg') {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Alert = React.createClass({

this.setState({
opened: false
}, function() {
}, () => {
if (onClose) onClose();
});
},
Expand Down
8 changes: 4 additions & 4 deletions src/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const Autocomplete = React.createClass({
loading: true
});

onFetch(value, function(results) {
onFetch(value, (results) => {
that.setState({
loading: false,
results
Expand Down Expand Up @@ -139,13 +139,13 @@ const Autocomplete = React.createClass({

return (
<div className="AutocompleteResults">
{results.map(function(result, i) {
{results.map((result, i) => {
const isActive = (i === cursor);

return <AutocompleteResult key={value + '-' + i} active={isActive}
return (<AutocompleteResult key={value + '-' + i} active={isActive}
onClick={e => that.onSelect(i)}>
<ResultComponent result={result} index={i} active={isActive} />
</AutocompleteResult>;
</AutocompleteResult>);
})}
</div>
);
Expand Down
20 changes: 10 additions & 10 deletions src/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const ButtonDropdown = React.createClass({
'dropup': up
});

inner = React.Children.map(children, function(child) {
inner = React.Children.map(children, (child) => {
// If the Button is connected through Redux.connect, it is
// renamed to "Connect(Button...)"
if (
Expand All @@ -103,7 +103,7 @@ const ButtonDropdown = React.createClass({
return null;
});

items = React.Children.map(children, function(child) {
items = React.Children.map(children, (child) => {
if (child && child.type && (child.type.displayName == 'DropdownItem' || child.type.displayName == 'DropdownDivider')) {
return React.cloneElement(child, {
onClick() {
Expand Down Expand Up @@ -183,13 +183,13 @@ const DropdownItem = React.createClass({
return null;
}, this);

return <li className={this.props.disabled ? 'disabled' : ''}>
return (<li className={this.props.disabled ? 'disabled' : ''}>
<a {...this.props} href={this.props.href || '#'} onClick={this.props.disabled ? null : this.onClick}>
{checked ? <div className="dropdown-icon pull-left"><Icon id="check" /></div> : ''}
{inner}
</a>
{outer}
</li>;
</li>);
}
});

Expand Down Expand Up @@ -228,9 +228,9 @@ const DropdownMenu = React.createClass({
}
);

return <ul className={className}>
return (<ul className={className}>
{this.props.children}
</ul>;
</ul>);
}
});

Expand All @@ -240,9 +240,9 @@ const ItemHeader = React.createClass({
},

render() {
return <div className="dropdown-itemheader">
return (<div className="dropdown-itemheader">
{this.props.children}
</div>;
</div>);
}
});

Expand All @@ -252,9 +252,9 @@ const ItemDesc = React.createClass({
},

render() {
return <div className="dropdown-itemdesc">
return (<div className="dropdown-itemdesc">
{this.props.children}
</div>;
</div>);
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const FormGroup = React.createClass({
},

render() {
let className = classNames('form-group', {
const className = classNames('form-group', {
'has-error': this.props.error
}, this.props.className);

Expand Down
2 changes: 1 addition & 1 deletion src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Modal = React.createClass({
},

render() {
let className = classNames('modal',
const className = classNames('modal',
'modal-' + this.props.size,
this.props.className, {
'without-backdrop': !this.props.backdrop
Expand Down
4 changes: 2 additions & 2 deletions src/ProgressBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ const ProgressBar = React.createClass({
},

render() {
return <div className="progress-bar">
return (<div className="progress-bar">
<div className="bar" style={this.getBarStyle()}>
<div className="progress-bar-shadow"
style={this.getShadowStyle()}>
</div>
</div>
</div>;
</div>);
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/Row.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ const Row = React.createClass({
},

render() {
return <div className="row">
return (<div className="row">
{this.props.children}
</div>;
</div>);
}
});

Expand Down
16 changes: 8 additions & 8 deletions src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ const Select = React.createClass({
* Render button to open select
*/
renderButton() {
let { disabled, block, multiple, placeholder } = this.props;
let { value, opened } = this.state;
let ComponentSelection = this.props.componentSelection || this.props.component;
const { disabled, block, multiple, placeholder } = this.props;
const { value, opened } = this.state;
const ComponentSelection = this.props.componentSelection || this.props.component;

let inner;

Expand Down Expand Up @@ -453,11 +453,11 @@ const Select = React.createClass({
});

// Filter empty groups based on search query
const filteredGroups = groups.map((group) => ({
const filteredGroups = groups.map(group => ({
...group,
options: group.options.filter((item, i) => filter(query, item, i))
}))
.filter((group) => group.options.length > 0);
.filter(group => group.options.length > 0);

return (
<div className={className}>
Expand Down Expand Up @@ -492,15 +492,15 @@ const Select = React.createClass({
},

render() {
let { name, block } = this.props;
const { name, block } = this.props;
const { opened } = this.state;

let className = classNames('SelectFormControl', {
const className = classNames('SelectFormControl', {
block
});

return (
<div className={className} onClick={(e) => e.stopPropagation()}>
<div className={className} onClick={e => e.stopPropagation()}>
<input type="hidden" name={name} value={this.getStringValue()} />
{this.renderButton()}
{opened ?
Expand Down
6 changes: 3 additions & 3 deletions src/Spinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Spinner = React.createClass({
},

render() {
let className = classNames('gb-spinner', 'spinner-' + this.props.size, {
const className = classNames('gb-spinner', 'spinner-' + this.props.size, {
'spinner-inverse': this.props.inverse,
'spinner-centered': this.props.centered
});
Expand All @@ -32,9 +32,9 @@ const Spinner = React.createClass({
*/
const SpinnerSlate = React.createClass({
render() {
return <div className="gb-spinner-slate">
return (<div className="gb-spinner-slate">
<Spinner {...this.props} />
</div>;
</div>);
}
});

Expand Down
6 changes: 3 additions & 3 deletions src/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const Table = React.createClass({
this.props.className
);

return <table className={className}>
return (<table className={className}>
{this.props.children}
</table>;
</table>);
}
});

Expand Down Expand Up @@ -88,7 +88,7 @@ const ExpendableBody = React.createClass({
if (this.isArray(item)) {
return (
<tr key={i}>
{item.map(function(value, j) {
{item.map((value, j) => {
return <td className={className} key={j}>{value}</td>;
})}
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const TabsItem = React.createClass({
},

render() {
let { children, href, active } = this.props;
const { children, href, active } = this.props;

return (
<li className={classNames({ active })}>
Expand Down
4 changes: 2 additions & 2 deletions src/Textarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ const Textarea = React.createClass({

const className = classNames('form-control', 'input-' + size, this.props.className);

return <textarea ref="textarea"
return (<textarea ref="textarea"
className={className} rows={rows} maxLength={maxLength}
autoFocus={autoFocus} disabled={disabled}
name={name} value={value} defaultValue={defaultValue}
placeholder={placeholder} onChange={this.onChange}></textarea>;
placeholder={placeholder} onChange={this.onChange}></textarea>);
}
});

Expand Down
8 changes: 4 additions & 4 deletions src/TimeGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const TimeLine = React.createClass({
const currentPoint = this.props.points[index];
const lastPoint = this.props.lastPoints[index];

return <line x1={lastX} y1={lastPoint.y} x2={currentX} y2={currentPoint.y}
stroke={currentPoint.color} strokeWidth={this.context.lineWidth} />;
return (<line x1={lastX} y1={lastPoint.y} x2={currentX} y2={currentPoint.y}
stroke={currentPoint.color} strokeWidth={this.context.lineWidth} />);
},

render() {
Expand Down Expand Up @@ -319,9 +319,9 @@ const XAxis = React.createClass({
return null;
}

return <text key={i} x={x} y={yTop}
return (<text key={i} x={x} y={yTop}
fontFamily={this.context.textFontFamily} fontSize={this.context.textFontSize}
fill={this.context.textColor} textAnchor="middle">{moment(date).format(valuePerInterval.format)}</text>;
fill={this.context.textColor} textAnchor="middle">{moment(date).format(valuePerInterval.format)}</text>);
})}
</g>
);
Expand Down
8 changes: 4 additions & 4 deletions src/Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ const TreeLeaf = React.createClass({
},

render() {
let { href, status } = this.props;
const { href, status } = this.props;
const { depth } = this.context;

let style = {
const style = {
paddingLeft: (PADDING_INITIAL + depth * DEPTH_PADDING)
};

let className = classNames('TreeLeaf', status ? 'status-' + status : '');
const className = classNames('TreeLeaf', status ? 'status-' + status : '');

return (
<a className={className} href={href} style={style}>
Expand Down Expand Up @@ -138,7 +138,7 @@ const TreeToggle = React.createClass({

render() {
const { active } = this.props;
let className = classNames('TreeToggle', {
const className = classNames('TreeToggle', {
active
});

Expand Down

0 comments on commit 2cd95e9

Please sign in to comment.