Showing 179 of 2,612 total issues
Avoid deeply nested control flow statements. Open
Open
if (Array.isArray(subDef)) {
const subs = subDef.map(({ type }) => getSimilarTypes(registry, definitions, type, imports).join(' | '));
possibleTypes.push(`[${subs.join(', ')}]`);
}
Function generateForMeta
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function generateForMeta (registry: Registry, meta: Metadata, dest: string, extraTypes: ExtraTypes, isStrict: boolean, customLookupDefinitions?: Definitions): void {
Avoid deeply nested control flow statements. Open
Open
if (params.length) {
describe('params', (): void => {
for (const { name, type } of params) {
if (skipInspectTypes.includes(type)) {
continue;
Function generateDefaultConsts
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function generateDefaultConsts (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
Function generateForMeta
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, isStrict: boolean, customLookupDefinitions?: Definitions): void {
Function generateForMeta
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, isStrict: boolean, customLookupDefinitions?: Definitions): void {
Function tsInt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function tsInt (_: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports, type: 'Int' | 'UInt' = 'Int'): string {
Function decodeU8aVec
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function decodeU8aVec <T extends Codec = Codec> (registry: Registry, result: unknown[], u8a: Uint8Array, startAt: number, Type: CodecClass<T>): [number, number] {
Function tsEnum
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: enumName, sub }: TypeDef, imports: TypeImports, withShortcut = false): string {
Function generateTsDefFor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function generateTsDefFor (registry: Registry, importDefinitions: Record<string, Record<string, ModuleTypes>>, defName: string, { types }: { types: Record<string, any> }, outputDir: string): void {
Function getStashInfo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function getStashInfo (api: DeriveApi, stashIds: AccountId[], activeEra: EraIndex, { withClaimedRewardsEras, withController, withDestination, withExposure, withExposureErasStakersLegacy, withExposureMeta, withLedger, withNominations, withPrefs }: StakingQueryFlags, page: u32 | AnyNumber): Observable<[(Option<AccountId> | null)[], Option<PalletStakingNominations>[], Option<PalletStakingRewardDestination>[], PalletStakingValidatorPrefs[], Option<SpStakingExposurePage>[], Option<SpStakingPagedExposureMetadata>[], number[][], SpStakingExposure[]]> {
Function createSubmittable
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function createSubmittable<ApiType extends ApiTypes> (apiType: ApiTypes, api: ApiInterfaceRx, decorateMethod: ApiBase<ApiType>['_decorateMethod'], registry?: Registry, blockHash?: Uint8Array): Creator<ApiType> {
Function getBatch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function getBatch (api: DeriveApi, activeEra: EraIndex, stashIds: AccountId[], flags: StakingQueryFlags, page: u32 | AnyNumber): Observable<DeriveStakingQuery[]> {
Function exportInterface
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function exportInterface (lookupIndex = -1, name = '', base: string, body = '', withShortcut = false): string {
Function formatType
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function formatType (registry: Registry, definitions: Record<string, ModuleTypes>, type: AnyString | TypeDef, imports: TypeImports, withShortcut = false): string {
Function generateDefaultEvents
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function generateDefaultEvents (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
Function generateDefaultRuntime
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function generateDefaultRuntime (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
Function generateDefaultQuery
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function generateDefaultQuery (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
Function generateDefaultTx
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function generateDefaultTx (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
Function convertErrors
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function convertErrors (specs: TypeSpec[], registry: Registry, modName: Text, errors: ErrorMetadataV13[], _sectionTypes: OverrideModuleType): PalletErrorMetadataV14 {