fix(prettier): Properly handle lint-stage files (#6970)
Now handles top level files and recursive files in folders. Set max line length to be 100
This commit is contained in:
@@ -99,10 +99,7 @@ function contains(haystack: Array, needle: any): boolean {
|
||||
if (typeof ptr === 'string' && ptr === needle.objectId) {
|
||||
return true;
|
||||
}
|
||||
if (
|
||||
ptr.className === needle.className &&
|
||||
ptr.objectId === needle.objectId
|
||||
) {
|
||||
if (ptr.className === needle.className && ptr.objectId === needle.objectId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -118,8 +115,7 @@ function contains(haystack: Array, needle: any): boolean {
|
||||
*/
|
||||
function matchesQuery(object: any, query: any): boolean {
|
||||
if (query instanceof Parse.Query) {
|
||||
var className =
|
||||
object.id instanceof Id ? object.id.className : object.className;
|
||||
var className = object.id instanceof Id ? object.id.className : object.className;
|
||||
if (className !== query.className) {
|
||||
return false;
|
||||
}
|
||||
@@ -158,11 +154,7 @@ function matchesKeyConstraints(object, key, constraints) {
|
||||
var keyComponents = key.split('.');
|
||||
var subObjectKey = keyComponents[0];
|
||||
var keyRemainder = keyComponents.slice(1).join('.');
|
||||
return matchesKeyConstraints(
|
||||
object[subObjectKey] || {},
|
||||
keyRemainder,
|
||||
constraints
|
||||
);
|
||||
return matchesKeyConstraints(object[subObjectKey] || {}, keyRemainder, constraints);
|
||||
}
|
||||
var i;
|
||||
if (key === '$or') {
|
||||
@@ -200,11 +192,7 @@ function matchesKeyConstraints(object, key, constraints) {
|
||||
});
|
||||
}
|
||||
|
||||
return equalObjectsGeneric(
|
||||
object[key],
|
||||
Parse._decode(key, constraints),
|
||||
equalObjects
|
||||
);
|
||||
return equalObjectsGeneric(object[key], Parse._decode(key, constraints), equalObjects);
|
||||
}
|
||||
// More complex cases
|
||||
for (var condition in constraints) {
|
||||
@@ -263,10 +251,7 @@ function matchesKeyConstraints(object, key, constraints) {
|
||||
// tries to submit a non-boolean for $exits outside the SDKs, just ignore it.
|
||||
break;
|
||||
}
|
||||
if (
|
||||
(!propertyExists && existenceIsRequired) ||
|
||||
(propertyExists && !existenceIsRequired)
|
||||
) {
|
||||
if ((!propertyExists && existenceIsRequired) || (propertyExists && !existenceIsRequired)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -311,10 +296,7 @@ function matchesKeyConstraints(object, key, constraints) {
|
||||
}
|
||||
var southWest = compareTo.$box[0];
|
||||
var northEast = compareTo.$box[1];
|
||||
if (
|
||||
southWest.latitude > northEast.latitude ||
|
||||
southWest.longitude > northEast.longitude
|
||||
) {
|
||||
if (southWest.latitude > northEast.latitude || southWest.longitude > northEast.longitude) {
|
||||
// Invalid box, crosses the date line
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user