lint(curly): consistent use of curly brackets in codebase (#3584)

This commit is contained in:
Alireza authored and GitHub committed 2023-08-09 10:07:33 -04:00
1 parent 9ae3d9f769
commit 5d435424e2
113 files changed
+1501 -1056

No files matched your search

+6 -2
View File
@@ -2,7 +2,9 @@
function getNestedObject(shallowObject) {
const nestedObject = {};
for (let key in shallowObject) {
if (!shallowObject.hasOwnProperty(key)) continue;
if (!shallowObject.hasOwnProperty(key)) {
continue;
}
const value = shallowObject[key];
const propertyArray = key.split('.');
let currentObject = nestedObject;
@@ -28,7 +30,9 @@ function getShallowObject(nestedObject) {
const shallowObject = {};
const putValues = (baseKey, nestedObject, resultObject) => {
for (let key in nestedObject) {
if (!nestedObject.hasOwnProperty(key)) continue;
if (!nestedObject.hasOwnProperty(key)) {
continue;
}
let currentKey = baseKey ? `${baseKey}.${key}` : key;
const currentValue = nestedObject[key];
if (typeof currentValue === 'object') {