Skip to content

Commit d40f150

Browse files
authored
Add prettier (parse-community#1275)
* Add prettier * Add config * pin prettier * pin husky, lint-staged
1 parent f5d7d1f commit d40f150

File tree

131 files changed

+13303
-10492
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+13303
-10492
lines changed

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
semi: true
2+
trailingComma: "es5"
3+
singleQuote: true
4+
arrowParens: "avoid"
5+
printWidth: 100

integration/cloud/main.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* global Parse */
2-
Parse.Cloud.define("bar", function(request) {
3-
if (request.params.key2 === "value1") {
2+
Parse.Cloud.define('bar', function (request) {
3+
if (request.params.key2 === 'value1') {
44
return 'Foo';
55
} else {
6-
throw "bad stuff happened";
6+
throw 'bad stuff happened';
77
}
88
});
99

@@ -26,26 +26,26 @@ Parse.Cloud.define('CloudFunctionIdempotency', function () {
2626
return object.save(null, { useMasterKey: true });
2727
});
2828

29-
Parse.Cloud.define('CloudFunctionUndefined', function() {
29+
Parse.Cloud.define('CloudFunctionUndefined', function () {
3030
return undefined;
3131
});
3232

33-
Parse.Cloud.job('CloudJob1', function() {
33+
Parse.Cloud.job('CloudJob1', function () {
3434
return {
35-
status: 'cloud job completed'
35+
status: 'cloud job completed',
3636
};
3737
});
3838

39-
Parse.Cloud.job('CloudJob2', function() {
40-
return new Promise((resolve) => {
41-
setTimeout(function() {
39+
Parse.Cloud.job('CloudJob2', function () {
40+
return new Promise(resolve => {
41+
setTimeout(function () {
4242
resolve({
43-
status: 'cloud job completed'
44-
})
43+
status: 'cloud job completed',
44+
});
4545
}, 1000);
4646
});
4747
});
4848

49-
Parse.Cloud.job('CloudJobFailing', function() {
49+
Parse.Cloud.job('CloudJobFailing', function () {
5050
throw 'cloud job failed';
5151
});

integration/server.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,18 @@ const api = new ParseServer({
2020
option2: 'world',
2121
},
2222
facebook: {
23-
appIds: "test"
23+
appIds: 'test',
2424
},
2525
twitter: {
26-
consumer_key: "5QiVwxr8FQHbo5CMw46Z0jquF",
27-
consumer_secret: "p05FDlIRAnOtqJtjIt0xcw390jCcjj56QMdE9B52iVgOEb7LuK",
26+
consumer_key: '5QiVwxr8FQHbo5CMw46Z0jquF',
27+
consumer_secret: 'p05FDlIRAnOtqJtjIt0xcw390jCcjj56QMdE9B52iVgOEb7LuK',
2828
},
2929
},
3030
verbose: false,
3131
silent: true,
3232
idempotencyOptions: {
33-
paths: [
34-
'functions/CloudFunctionIdempotency',
35-
'jobs/CloudJob1',
36-
'classes/IdempotentTest'
37-
],
38-
ttl: 120
33+
paths: ['functions/CloudFunctionIdempotency', 'jobs/CloudJob1', 'classes/IdempotentTest'],
34+
ttl: 120,
3935
},
4036
serverStartComplete: () => {
4137
/* Ignore ParseError: schema class name does not revalidate */
@@ -54,5 +50,5 @@ app.get('/clear/:fast', (req, res) => {
5450
});
5551

5652
module.exports = {
57-
app
53+
app,
5854
};

0 commit comments

Comments
 (0)