Skip to content

Commit 27776a5

Browse files
committed
Fixed ESLint Errors in Process Stack & Safe Regex Util Functions
1 parent d8bc8e3 commit 27776a5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/utils/process-stack.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default async function processStack(flags: any, stack: any, startTime: nu
1616
contentTypes.items.forEach((contentType: any) => {
1717
safeRegexCheck(contentType, invalidRegex, tableData, 'Content Type')
1818
})
19-
}).catch((error: Error) => {
19+
}).catch(() => {
2020
throw new Error(regexMessages.errors.contentTypes)
2121
})
2222
}
@@ -26,7 +26,7 @@ export default async function processStack(flags: any, stack: any, startTime: nu
2626
globalFields.items.forEach((globalField: any) => {
2727
safeRegexCheck(globalField, invalidRegex, tableData, 'Global Field')
2828
})
29-
}).catch((error: Error) => {
29+
}).catch(() => {
3030
throw new Error(regexMessages.errors.globalFields)
3131
})
3232
}

src/utils/safe-regex.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ const safeRegexCheck = (document: any, invalidRegex: any, tableData: any, type:
2929
newPath = ''
3030
} else {
3131
const regexObject = {
32-
'Module': type,
33-
'Title': document.title,
34-
'UID': document.uid,
32+
Module: type,
33+
Title: document.title,
34+
UID: document.uid,
3535
'Field Title': field.display_name,
3636
'Field UID': field.uid,
3737
'Field Path': newPath,
@@ -47,9 +47,9 @@ const safeRegexCheck = (document: any, invalidRegex: any, tableData: any, type:
4747
const currentCount = invalidRegex.length - beforeCount
4848
if (currentCount > 0 && !nested) {
4949
const tableDataObject = {
50-
'Module': type,
51-
'Title': document.title,
52-
'UID': document.uid,
50+
Module: type,
51+
Title: document.title,
52+
UID: document.uid,
5353
'Invalid Regex Count': currentCount,
5454
}
5555
tableData.push(tableDataObject)

0 commit comments

Comments
 (0)