Skip to content

Commit

Permalink
chore(v2): remove prettier from specific projects
Browse files Browse the repository at this point in the history
  • Loading branch information
yangshun committed Feb 23, 2019
1 parent 7eac482 commit 63851a6
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 51 deletions.
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
__generated__
__fixtures__
dist
node_modules
build
1 change: 0 additions & 1 deletion v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
"husky": "^0.14.3",
"jest": "^23.6.0",
"lint-staged": "^7.2.0",
"prettier": "^1.13.7",
"rimraf": "^2.6.2"
}
}
4 changes: 0 additions & 4 deletions v1/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5829,10 +5829,6 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"

prettier@^1.13.7:
version "1.14.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895"

pretty-format@^23.6.0:
version "23.6.0"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760"
Expand Down
2 changes: 1 addition & 1 deletion v2/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
generated
__generated__
__fixtures__
dist
node_modules
Expand Down
2 changes: 1 addition & 1 deletion v2/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
node_modules
dist
yarn-error.log
generated
__generated__
website/node_modules
build
2 changes: 1 addition & 1 deletion v2/lib/load/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const fm = require('front-matter');
const escapeStringRegexp = require('escape-string-regexp');
const fs = require('fs-extra');

const genPath = path.resolve(__dirname, '../core/generated');
const genPath = path.resolve(__dirname, '../core/__generated__');
fs.ensureDirSync(genPath);

const genCache = new Map();
Expand Down
54 changes: 28 additions & 26 deletions v2/lib/theme/DocsPaginator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,36 @@ function DocsPaginator() {
return (
<div className={styles.paginatorContainer}>
<div>
{metadata.previous && docsMetadatas[metadata.previous] && (
<Link
className={styles.paginatorLink}
to={docsMetadatas[metadata.previous].permalink}>
<svg className={styles.arrow} viewBox="0 0 24 24">
<g>
<line x1="19" y1="12" x2="5" y2="12" />
<polyline points="12 19 5 12 12 5" />
</g>
</svg>{' '}
<span className={styles.label}>{metadata.previous_title}</span>
</Link>
)}
{metadata.previous &&
docsMetadatas[metadata.previous] && (
<Link
className={styles.paginatorLink}
to={docsMetadatas[metadata.previous].permalink}>
<svg className={styles.arrow} viewBox="0 0 24 24">
<g>
<line x1="19" y1="12" x2="5" y2="12" />
<polyline points="12 19 5 12 12 5" />
</g>
</svg>{' '}
<span className={styles.label}>{metadata.previous_title}</span>
</Link>
)}
</div>
<div className={styles.paginatorRightContainer}>
{metadata.next && docsMetadatas[metadata.next] && (
<Link
className={styles.paginatorLink}
to={docsMetadatas[metadata.next].permalink}>
<span className={styles.label}>{metadata.next_title}</span>{' '}
<svg className={styles.arrow} viewBox="0 0 24 24">
<g>
<line x1="5" y1="12" x2="19" y2="12" />
<polyline points="12 5 19 12 12 19" />
</g>
</svg>
</Link>
)}
{metadata.next &&
docsMetadatas[metadata.next] && (
<Link
className={styles.paginatorLink}
to={docsMetadatas[metadata.next].permalink}>
<span className={styles.label}>{metadata.next_title}</span>{' '}
<svg className={styles.arrow} viewBox="0 0 24 24">
<g>
<line x1="5" y1="12" x2="19" y2="12" />
<polyline points="12 5 19 12 12 19" />
</g>
</svg>
</Link>
)}
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion v2/lib/webpack/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module.exports = function createBaseConfig(props, isServer) {
.set('@docs', docsDir)
.set('@pages', pagesDir)
.set('@build', outDir)
.set('@generated', path.resolve(__dirname, '../core/generated'))
.set('@generated', path.resolve(__dirname, '../core/__generated__'))
.set('@core', path.resolve(__dirname, '../core'))
.set('@docusaurus', path.resolve(__dirname, '../docusaurus'))
.end()
Expand Down
1 change: 0 additions & 1 deletion v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-react-hooks": "^0.0.0",
"jest": "^23.4.2",
"prettier": "^1.13.7",
"react": "^16.7.0-alpha.0",
"react-dom": "^16.7.0-alpha.0",
"react-helmet": "^5.2.0"
Expand Down
23 changes: 13 additions & 10 deletions v2/website/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,19 @@ const QUOTES = [

function Home() {
const [featureIndex, setFeatureIndex] = useState(0);
useEffect(() => {
const timer = window.setTimeout(() => {
setFeatureIndex(
prevFeatureIndex => (prevFeatureIndex + 1) % FEATURES.length,
);
}, FEATURE_INTERVAL);
return () => {
window.clearTimeout(timer);
};
}, [featureIndex]);
useEffect(
() => {
const timer = window.setTimeout(() => {
setFeatureIndex(
prevFeatureIndex => (prevFeatureIndex + 1) % FEATURES.length,
);
}, FEATURE_INTERVAL);
return () => {
window.clearTimeout(timer);
};
},
[featureIndex],
);

return (
<div>
Expand Down
5 changes: 0 additions & 5 deletions v2/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6738,11 +6738,6 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=

prettier@^1.13.7:
version "1.16.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717"
integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==

pretty-error@^2.0.2:
version "2.1.1"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"
Expand Down

0 comments on commit 63851a6

Please sign in to comment.