mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-12 14:28:09 +02:00
Prettify all JavaScript files (#964)
* Prettify all JavaScript files * Make trailingComma all * Delete v2/.prettierignore * Remove v2 Prettier commands in package.json
This commit is contained in:
parent
a1de6dab04
commit
9d4a5d5359
101 changed files with 441 additions and 473 deletions
|
@ -31,7 +31,7 @@ class LanguageDropDown extends React.Component {
|
|||
render() {
|
||||
setLanguage(this.props.language || 'en');
|
||||
const helpTranslateString = translate(
|
||||
'Help Translate|recruit community translators for your project'
|
||||
'Help Translate|recruit community translators for your project',
|
||||
);
|
||||
// add all enabled languages to dropdown
|
||||
const enabledLanguages = env.translation
|
||||
|
@ -49,7 +49,7 @@ class LanguageDropDown extends React.Component {
|
|||
siteConfig.baseUrl +
|
||||
this.props.current.permalink.replace(
|
||||
`/${this.props.language}/`,
|
||||
`/${lang.tag}/`
|
||||
`/${lang.tag}/`,
|
||||
);
|
||||
} else if (this.props.current.id && this.props.current.id !== 'index') {
|
||||
href = `${siteConfig.baseUrl + lang.tag}/${this.props.current.id}`;
|
||||
|
@ -81,7 +81,7 @@ class LanguageDropDown extends React.Component {
|
|||
rel="noreferrer noopener">
|
||||
{helpTranslateString}
|
||||
</a>
|
||||
</li>
|
||||
</li>,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -251,20 +251,20 @@ class HeaderNav extends React.Component {
|
|||
throw new Error(
|
||||
`You have 'doc' in your headerLinks, but no '${readMetadata.getDocsPath()}' folder exists one level up from ` +
|
||||
`'website' folder. Did you run \`docusaurus-init\` or \`npm run examples\`? If so, ` +
|
||||
`make sure you rename 'docs-examples-from-docusaurus' to 'docs'.`
|
||||
`make sure you rename 'docs-examples-from-docusaurus' to 'docs'.`,
|
||||
);
|
||||
}
|
||||
if (link.blog && !fs.existsSync(`${CWD}/blog/`)) {
|
||||
throw new Error(
|
||||
"You have 'blog' in your headerLinks, but no 'blog' folder exists in your " +
|
||||
"'website' folder. Did you run `docusaurus-init` or `npm run examples`? If so, " +
|
||||
"make sure you rename 'blog-examples-from-docusaurus' to 'blog'."
|
||||
"make sure you rename 'blog-examples-from-docusaurus' to 'blog'.",
|
||||
);
|
||||
}
|
||||
if (link.page && !fs.existsSync(`${CWD}/pages/`)) {
|
||||
throw new Error(
|
||||
"You have 'page' in your headerLinks, but no 'pages' folder exists in your " +
|
||||
"'website' folder."
|
||||
"'website' folder.",
|
||||
);
|
||||
}
|
||||
// We will add search bar to end if location not specified
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue