mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-22 05:27:00 +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
|
@ -45,9 +45,9 @@ let customTranslations = {
|
|||
if (fs.existsSync(`${CWD}/data/custom-translation-strings.json`)) {
|
||||
customTranslations = deepmerge(
|
||||
JSON.parse(
|
||||
fs.readFileSync(`${CWD}/data/custom-translation-strings.json`, 'utf8')
|
||||
fs.readFileSync(`${CWD}/data/custom-translation-strings.json`, 'utf8'),
|
||||
),
|
||||
customTranslations
|
||||
customTranslations,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ function execute() {
|
|||
if (!file.endsWith('-sidebars.json')) {
|
||||
if (file.endsWith('-sidebar.json')) {
|
||||
console.warn(
|
||||
`Skipping ${file}. Make sure your sidebar filenames follow this format: 'version-VERSION-sidebars.json'.`
|
||||
`Skipping ${file}. Make sure your sidebar filenames follow this format: 'version-VERSION-sidebars.json'.`,
|
||||
);
|
||||
}
|
||||
return;
|
||||
|
@ -185,11 +185,11 @@ function execute() {
|
|||
] = 'Translate';
|
||||
translations['pages-strings'] = Object.assign(
|
||||
translations['pages-strings'],
|
||||
customTranslations['pages-strings']
|
||||
customTranslations['pages-strings'],
|
||||
);
|
||||
translations['localized-strings'] = deepmerge(
|
||||
translations['localized-strings'],
|
||||
customTranslations['localized-strings']
|
||||
customTranslations['localized-strings'],
|
||||
);
|
||||
writeFileAndCreateFolder(
|
||||
`${CWD}/i18n/en.json`,
|
||||
|
@ -198,11 +198,11 @@ function execute() {
|
|||
{
|
||||
_comment: 'This file is auto-generated by write-translations.js',
|
||||
},
|
||||
translations
|
||||
translations,
|
||||
),
|
||||
null,
|
||||
2
|
||||
)}\n`
|
||||
2,
|
||||
)}\n`,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue