Showing 824 of 824 total issues
Function buildRateLimitConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const buildRateLimitConfig = (redis: Redis): RateLimitPluginOptions => ({
// Apply the rate limit setting to all routes within the encapsulation scope
global: true,
// The maximum number of 429 responses to return to a single client before returning 403
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function copyDictionaryToJs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function copyDictionaryToJs<TKey extends Il2Cpp.String | number, TValue extends Il2Cpp.Method.ReturnType>(
object: Il2Cpp.Object
): Record<TKey extends number ? number : string, TValue> {
const dictionary = {} as Record<string | number, TValue>;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function removeHandlers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public removeHandlers(...handlerNames: IHandlerName[]): void {
for (const handlerName of handlerNames) {
for (const handler of this._handlers) {
if (handler.name === handlerName) {
this._handlers.delete(handler);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function makeSaveBetterThan
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const makeSaveBetterThan = async function <T extends INimblebitJsonSave | DecompressedSave>(
save1: T,
save2: T,
forceLoadStructs: boolean = false,
logger: ILogger = debug
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"