diff --git a/package.json b/package.json index 1d5273ba6d..6a6d219e31 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", "bisheng": "^0.21.0", - "bisheng-plugin-antd": "^0.8.0", + "bisheng-plugin-antd": "^0.10.0", "bisheng-plugin-description": "^0.1.1", "bisheng-plugin-react": "^0.4.0", "bisheng-plugin-toc": "^0.4.0", @@ -143,7 +143,7 @@ "lint:es": "eslint tests site scripts components ./.eslintrc.js ./webpack.config.js --ext '.js,.jsx'", "lint:demo": "cross-env RUN_ENV=DEMO eslint components/*/demo/*.md --ext '.md'", "lint:style": "stylelint \"components/**/*.less\" --syntax less", - "lint-fix": "npm run eslint-fix:code && npm run eslint-fix:demo", + "lint-fix": "npm run lint-fix:code && npm run lint-fix:demo", "lint-fix:code": "eslint --fix tests site scripts components ./.eslintrc.js ./webpack.config.js --ext '.js,.jsx'", "lint-fix:demo": "eslint-tinker ./components/*/demo/*.md", "dist": "antd-tools run dist", diff --git a/site/theme/template/Content/index.jsx b/site/theme/template/Content/index.jsx index ed83224ee2..f32dacb910 100644 --- a/site/theme/template/Content/index.jsx +++ b/site/theme/template/Content/index.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import collect from 'bisheng/collect'; import MainContent from './MainContent'; import * as utils from '../utils'; @@ -14,7 +13,7 @@ export default collect(async (nextProps) => { nextProps.data.changelog.CHANGELOG : nextProps.utils.get(nextProps.data, pageDataPath); if (!pageData) { - throw 404; + throw 404; // eslint-disable-line no-throw-literal } const locale = utils.isZhCN(pathname) ? 'zh-CN' : 'en-US'; @@ -22,8 +21,8 @@ export default collect(async (nextProps) => { pageData() : (pageData[locale] || pageData.index[locale] || pageData.index)(); const demosFetcher = nextProps.utils.get(nextProps.data, [...pageDataPath, 'demo']); if (demosFetcher) { - const [ localizedPageData, demos ] = await Promise.all([pageDataPromise, demosFetcher()]); - return { localizedPageData, demos } + const [localizedPageData, demos] = await Promise.all([pageDataPromise, demosFetcher()]); + return { localizedPageData, demos }; } return { localizedPageData: await pageDataPromise }; })(MainContent);