Cherry-pick linting update from #1224

This commit is contained in:
Michael Shilman 2017-06-09 19:58:01 +12:00
parent 244732accb
commit 6807b5e7f8
4 changed files with 10 additions and 10 deletions

View File

@ -106,7 +106,7 @@ export default function Node(props) {
/>
<span style={tagStyle}>&gt;</span>
</div>
{React.Children.map(children, childElement => (
{React.Children.map(children, childElement =>
<Node
node={childElement}
depth={depth + 1}
@ -115,7 +115,7 @@ export default function Node(props) {
maxPropArrayLength={maxPropArrayLength}
maxPropStringLength={maxPropStringLength}
/>
))}
)}
<div style={containerStyleCopy}>
<span style={tagStyle}>&lt;/{name}&gt;</span>
</div>

View File

@ -98,7 +98,7 @@ export default function PropTable(props) {
</tr>
</thead>
<tbody>
{array.map(row => (
{array.map(row =>
<tr key={row.property}>
<td>{row.property}</td>
<td>{row.propType}</td>
@ -110,7 +110,7 @@ export default function PropTable(props) {
</td>
<td>{row.description}</td>
</tr>
))}
)}
</tbody>
</table>
);

View File

@ -264,7 +264,7 @@ export default class Story extends React.Component {
<div>
<h1 style={this.state.stylesheet.source.h1}>Story Source</h1>
<Pre>
{React.Children.map(this.props.children, (root, idx) => (
{React.Children.map(this.props.children, (root, idx) =>
<Node
key={idx}
node={root}
@ -274,7 +274,7 @@ export default class Story extends React.Component {
maxPropArrayLength={maxPropArrayLength}
maxPropStringLength={maxPropStringLength}
/>
))}
)}
</Pre>
</div>
);
@ -329,7 +329,7 @@ export default class Story extends React.Component {
array.sort((a, b) => (a.displayName || a.name) > (b.displayName || b.name));
const { maxPropObjectKeys, maxPropArrayLength, maxPropStringLength } = this.props;
const propTables = array.map(type => (
const propTables = array.map(type =>
<div key={type.name}>
<h2 style={this.state.stylesheet.propTableHead}>
"{type.displayName || type.name}" Component
@ -341,7 +341,7 @@ export default class Story extends React.Component {
maxPropStringLength={maxPropStringLength}
/>
</div>
));
);
if (!propTables || propTables.length === 0) {
return null;

View File

@ -50,14 +50,14 @@ export default function(configDir) {
};
router.get('/', (req, res) => {
const headHtml = getManagerHeadHtml(configDir)
const headHtml = getManagerHeadHtml(configDir);
res.send(getIndexHtml({ publicPath, headHtml }));
});
router.get('/iframe.html', (req, res) => {
const headHtml = getHeadHtml(configDir);
res.send(getIframeHtml({ ...data, headHtml, publicPath }));
});
});
if (stats.toJson().errors.length) {
webpackReject(stats);