Browse Source

Fix eslint

pull/2556/head
afc163 8 years ago
parent
commit
a139442307
  1. 4
      scripts/build-common.js
  2. 2
      site/theme/template/Content/ComponentDoc.jsx
  3. 2
      site/theme/template/Content/Demo.jsx

4
scripts/build-common.js

@ -7,8 +7,8 @@ const utils = require('./utils');
module.exports = function buildCommon(dirs, outputFile) {
const mds = utils.findMDFile(dirs, true)
.filter((file) => !/\/demo$/i.test(path.dirname(file)))
.filter((file) => !/install_en\.md$/gi.test(file)); // TODO
.filter((file) => !/\/demo$/i.test(path.dirname(file)))
.filter((file) => !/install_en\.md$/gi.test(file)); // TODO
const addedMd = [];
let content = 'module.exports = {';

2
site/theme/template/Content/ComponentDoc.jsx

@ -30,7 +30,7 @@ export default class ComponentDoc extends React.Component {
const { content, meta } = doc;
const locale = this.context.intl.locale;
const demos = Object.keys(props.demos).map((key) => props.demos[key])
.filter((demoData) => !demoData.meta.hidden);
.filter((demoData) => !demoData.meta.hidden);
const expand = this.state.expandAll;
const isSingleCol = meta.cols === 1;

2
site/theme/template/Content/Demo.jsx

@ -49,7 +49,7 @@ export default class Demo extends React.Component {
const localizedTitle = meta.title[locale] || meta.title;
const localizeIntro = content[locale] || content;
const introChildren = props.utils
.toReactComponent(['div'].concat(localizeIntro));
.toReactComponent(['div'].concat(localizeIntro));
const highlightClass = classNames({
'highlight-wrapper': true,

Loading…
Cancel
Save