XYOracleNetwork/sdk-xyo-client-js

View on GitHub

Showing 114 of 365 total issues

File japanese.ts has 2048 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable max-lines */
/** @deprecated use @scure/bip39 instead */
export const wordlist: string[] = `あいこくしん
あいさつ
あいだ
Severity: Major
Found in packages/protocol/packages/bip39/src/wordlists/japanese.ts - About 5 days to fix

    File simplified-chinese.ts has 2048 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable max-lines */
    /** @deprecated use @scure/bip39 instead */
    export const wordlist: string[] = `的
    一
    是
    Severity: Major
    Found in packages/protocol/packages/bip39/src/wordlists/simplified-chinese.ts - About 5 days to fix

      File english.ts has 2048 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint-disable max-lines */
      /** @deprecated use @scure/bip39 instead */
      export const wordlist: string[] = `abandon
      ability
      able
      Severity: Major
      Found in packages/protocol/packages/bip39/src/wordlists/english.ts - About 5 days to fix

        File french.ts has 2048 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* eslint-disable max-lines */
        /** @deprecated use @scure/bip39 instead */
        export const wordlist: string[] = `abaisser
        abandon
        abdiquer
        Severity: Major
        Found in packages/protocol/packages/bip39/src/wordlists/french.ts - About 5 days to fix

          File italian.ts has 2048 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* eslint-disable max-lines */
          /** @deprecated use @scure/bip39 instead */
          export const wordlist: string[] = `abaco
          abbaglio
          abbinato
          Severity: Major
          Found in packages/protocol/packages/bip39/src/wordlists/italian.ts - About 5 days to fix

            File czech.ts has 2048 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /* eslint-disable max-lines */
            /** @deprecated use @scure/bip39 instead */
            export const wordlist: string[] = `abdikace
            abeceda
            adresa
            Severity: Major
            Found in packages/protocol/packages/bip39/src/wordlists/czech.ts - About 5 days to fix

              File spanish.ts has 2048 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /* eslint-disable max-lines */
              /** @deprecated use @scure/bip39 instead */
              export const wordlist: string[] = `ábaco
              abdomen
              abeja
              Severity: Major
              Found in packages/protocol/packages/bip39/src/wordlists/spanish.ts - About 5 days to fix

                File traditional-chinese.ts has 2048 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* eslint-disable max-lines */
                /** @deprecated use @scure/bip39 instead */
                export const wordlist: string[] = `的
                一
                是
                Severity: Major
                Found in packages/protocol/packages/bip39/src/wordlists/traditional-chinese.ts - About 5 days to fix

                  File korean.ts has 2048 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* eslint-disable max-lines */
                  /** @deprecated use @scure/bip39 instead */
                  export const wordlist: string[] = `가격
                  가끔
                  가난
                  Severity: Major
                  Found in packages/protocol/packages/bip39/src/wordlists/korean.ts - About 5 days to fix

                    Function resolveHandler has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
                    Open

                      async resolveHandler<T extends ModuleInstance = ModuleInstance>(
                        idOrFilter: ModuleFilter<T> | ModuleIdentifier = '*',
                        options: ModuleFilterOptions<T> = {},
                      ): Promise<T[]> {
                        const mutatedOptions = { ...options, maxDepth: options?.maxDepth ?? CompositeModuleResolver.defaultMaxDepth }

                    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 resolve has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                    Open

                      async resolve<T extends ModuleInstance = ModuleInstance>(
                        idOrFilter: ModuleFilter<T> | ModuleIdentifier = '*',
                        options?: ModuleFilterOptions<T>,
                      ): Promise<T | T[] | undefined> {
                        // console.log(`childAddressMap: ${toJsonString(this.childAddressMap, 10)}`)

                    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 resolve has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
                    Open

                      static async resolve<T extends ModuleInstance = ModuleInstance>(
                        config: ResolveHelperConfig,
                        idOrFilter: ModuleFilter<T> | ModuleIdentifier = '*',
                        {
                     maxDepth = 3, required = 'log', ...options

                    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

                    ModuleWrapper has 54 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    @constructableModuleWrapper()
                    export class ModuleWrapper<TWrappedModule extends Module = Module>
                      extends Base<Exclude<Omit<TWrappedModule['params'], 'config'> & { config: Exclude<TWrappedModule['params']['config'], undefined> }, undefined>>
                      implements AttachableModuleInstance<TWrappedModule['params'], TWrappedModule['eventData']> {
                      static instanceIdentityCheck: InstanceTypeCheck = isModuleInstance

                      Function resolveHandler has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
                      Open

                        resolveHandler<T extends ModuleInstance = ModuleInstance>(
                          idOrFilter: ModuleFilter<T> | string = '*',
                          options?: ModuleFilterOptions<T>,
                        ): Promisable<T[]> {
                          const unfiltered = (() => {

                      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

                      File ModuleWrapper.ts has 390 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import { assertEx } from '@xylabs/assert'
                      import { exists } from '@xylabs/exists'
                      import { Address } from '@xylabs/hex'
                      import { Logger } from '@xylabs/logger'
                      import { Base } from '@xylabs/object'

                        Quadkey has 37 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        export class Quadkey {
                          static Zero = Quadkey.from(0, 0n)
                          static root = new Quadkey()
                          static type = 'Quadkey'
                        
                        
                        Severity: Minor
                        Found in packages/sdk-utils/packages/quadkey/src/Quadkey.ts - About 4 hrs to fix

                          Function resolveHandler has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            async resolveHandler<T extends ModuleInstance = ModuleInstance>(
                              idOrFilter: ModuleFilter<T> | ModuleIdentifier = '*',
                              options: ModuleFilterOptions<T> = {},
                            ): Promise<T[]> {
                              const mutatedOptions = { ...options, maxDepth: options?.maxDepth ?? CompositeModuleResolver.defaultMaxDepth }

                            Function findPayload has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                            Open

                            export const findPayload = async (
                              archivist: ArchivistInstance,
                              boundWitnessDiviner: BoundWitnessDiviner,
                              payloadDiviner: PayloadDiviner,
                              pointer: PointerPayload,

                            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

                            File Events.ts has 303 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import { assertEx } from '@xylabs/assert'
                            import { handleError } from '@xylabs/error'
                            import { forget } from '@xylabs/forget'
                            import type { BaseParams } from '@xylabs/object'
                            import { Base } from '@xylabs/object'
                            Severity: Minor
                            Found in packages/modules/packages/module/packages/events/src/Events/Events.ts - About 3 hrs to fix

                              Function resolve has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                static async resolve<T extends ModuleInstance = ModuleInstance>(
                                  config: ResolveHelperConfig,
                                  idOrFilter: ModuleFilter<T> | ModuleIdentifier = '*',
                                  {
                               maxDepth = 3, required = 'log', ...options
                                Severity
                                Category
                                Status
                                Source
                                Language