mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-19 05:02:40 +08:00
Cherry-pick linting update from #1224
This commit is contained in:
parent
244732accb
commit
6807b5e7f8
@ -106,7 +106,7 @@ export default function Node(props) {
|
||||
/>
|
||||
<span style={tagStyle}>></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}></{name}></span>
|
||||
</div>
|
||||
|
@ -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>
|
||||
);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user