Showing 179 of 2,612 total issues
File tx.ts
has 540 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
File substrate.ts
has 530 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
File rpc.ts
has 500 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Copyright 2017-2024 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// As per frontier
File types-kusama.ts
has 483 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
File index.spec.ts
has 477 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Copyright 2017-2024 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev-test/globals.d.ts" />
File tx.ts
has 475 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
File query.ts
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
File types.ts
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { PortableRegistry } from '@polkadot/types';
import type { BTreeMap, Bytes, Enum, Option, Struct, Text, Type, Vec, WrapperOpaque, bool, u8 } from '@polkadot/types-codec';
File events.ts
has 466 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
File types.ts
has 436 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Bytes, Compact, Enum, Null, Option, Raw, Result, Set, Struct, Text, U8aFixed, bool, u32, u64, u8 } from '@polkadot/types-codec';
import type { AccountId, Balance, BlockNumber, Hash, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime';
File metadataMd.ts
has 435 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Copyright 2017-2024 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { MetadataLatest, SiLookupTypeId } from '@polkadot/types/interfaces';
import type { PortableRegistry } from '@polkadot/types/metadata';
Function getSimilarTypes
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
Open
export function getSimilarTypes (registry: Registry, definitions: Record<string, ModuleTypes>, _type: string, imports: TypeImports): string[] {
const typeParts = _type.split('::');
const type = typeParts[typeParts.length - 1];
const possibleTypes = [formatType(registry, definitions, type, imports)];
- 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
File consts.ts
has 433 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
File definitions.ts
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Copyright 2017-2024 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// order important in structs... :)
/* eslint-disable sort-keys */
File runtime.ts
has 411 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Copyright 2017-2024 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DefinitionsCall, DefinitionsCallEntry } from '../../types/index.js';
File rpc.ts
has 408 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Copyright 2017-2024 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DefinitionsRpc } from '../../types/index.js';
File Enum.spec.ts
has 393 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Copyright 2017-2024 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev-test/globals.d.ts" />
Function getDefs
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
Open
function getDefs (apis: Apis | null, defs: Record<string, Definitions>): Record<string, Record<string, DefinitionCallNamed>> {
const named: Record<string, Record<string, DefinitionCallNamed>> = {};
const all = Object.values(defs);
for (let j = 0, jcount = all.length; j < jcount; j++) {
- 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
File events.ts
has 387 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
File v3.ts
has 378 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Copyright 2017-2024 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// order important in structs... :)
/* eslint-disable sort-keys */