summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-05-26 19:36:41 +0200
committerLukas Eipert <leipert@gitlab.com>2018-06-15 12:43:03 +0200
commit5f3a219e14c27bb2e3a305f8c9170aaca3220be1 (patch)
tree5075288e3ab05a33eda86a27f98b6417be51b62a /scripts
parentf39582f7b8cc9f1fdb74b58eece944110fc0a625 (diff)
downloadgitlab-ce-5f3a219e14c27bb2e3a305f8c9170aaca3220be1.tar.gz
Fixed Prettier Config Applying + Updated Prettier to newest version
Diffstat (limited to 'scripts')
-rw-r--r--scripts/frontend/prettier.js40
1 files changed, 20 insertions, 20 deletions
diff --git a/scripts/frontend/prettier.js b/scripts/frontend/prettier.js
index 39de77bc333..4979ec3c409 100644
--- a/scripts/frontend/prettier.js
+++ b/scripts/frontend/prettier.js
@@ -73,12 +73,12 @@ if (!files.length) {
console.log(`${shouldSave ? 'Updating' : 'Checking'} ${files.length} file(s)`);
-prettier
- .resolveConfig('.')
- .then(options => {
- console.log('Found options : ', options);
- files.forEach(file => {
- try {
+
+files.forEach(file => {
+ try {
+ prettier
+ .resolveConfig(file)
+ .then(options => {
const fileExtension = file.split('.').pop();
Object.assign(options, {
parser: config.parsers[fileExtension],
@@ -101,17 +101,17 @@ prettier
}
console.log(`Prettify Manually : ${file}`);
}
- } catch (error) {
- didError = true;
- console.log(`\n\nError with ${file}: ${error.message}`);
- }
- });
-
- if (didWarn || didError) {
- process.exit(1);
- }
- })
- .catch(e => {
- console.log(`Error on loading the Config File: ${e.message}`);
- process.exit(1);
- });
+ })
+ .catch(e => {
+ console.log(`Error on loading the Config File: ${e.message}`);
+ process.exit(1);
+ });
+ } catch (error) {
+ didError = true;
+ console.log(`\n\nError with ${file}: ${error.message}`);
+ }
+});
+
+if (didWarn || didError) {
+ process.exit(1);
+}