From ae9d139754e3023085e212c38af66e87bc7f1b7a Mon Sep 17 00:00:00 2001 From: antelle Date: Sun, 24 May 2020 18:56:50 +0200 Subject: [PATCH] prettier --- .prettierrc | 8 ++++++++ scripts/update-plugins.js | 22 +++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..8417a0e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "tabWidth": 4, + "singleQuote": true, + "printWidth": 100, + "trailingComma": "none", + "quoteProps": "preserve", + "endOfLine": "auto" +} diff --git a/scripts/update-plugins.js b/scripts/update-plugins.js index c5fc17f..e3cd136 100644 --- a/scripts/update-plugins.js +++ b/scripts/update-plugins.js @@ -34,7 +34,9 @@ for (const plugin of data.plugins) { if (plugin.manifest.locale) { continue; } - plugin.manifest = JSON.parse(fs.readFileSync(`docs/plugins/${plugin.manifest.name}/manifest.json`, 'utf8')); + plugin.manifest = JSON.parse( + fs.readFileSync(`docs/plugins/${plugin.manifest.name}/manifest.json`, 'utf8') + ); } console.log('Checking for changes...'); @@ -53,11 +55,13 @@ console.log('Signing...'); const dataToSign = Buffer.from(JSON.stringify(data, null, 2)); -sign(dataToSign).then(signature => { - data.signature = signature.toString('base64'); - fs.writeFileSync('docs/plugins.json', JSON.stringify(data, null, 2)); - console.log('Done'); -}).catch(err => { - console.error('Sign error', err); - process.exit(1); -}); +sign(dataToSign) + .then(signature => { + data.signature = signature.toString('base64'); + fs.writeFileSync('docs/plugins.json', JSON.stringify(data, null, 2)); + console.log('Done'); + }) + .catch(err => { + console.error('Sign error', err); + process.exit(1); + });