diff --git a/packages/hardhat/src/index.ts b/packages/hardhat/src/index.ts index ceec9cdc..3af2b083 100644 --- a/packages/hardhat/src/index.ts +++ b/packages/hardhat/src/index.ts @@ -1,9 +1,9 @@ import './type-extensions' +import type { PublicConfig as RunTypeChainConfig } from '@collabland/typechain' import { TASK_CLEAN, TASK_COMPILE, TASK_COMPILE_SOLIDITY_COMPILE_JOBS } from 'hardhat/builtin-tasks/task-names' import { extendConfig, subtask, task, types } from 'hardhat/config' import { getFullyQualifiedName } from 'hardhat/utils/contract-names' -import type { PublicConfig as RunTypeChainConfig } from '@collabland/typechain' import { getDefaultTypechainConfig } from './config' import { TASK_TYPECHAIN, TASK_TYPECHAIN_GENERATE_TYPES } from './constants' diff --git a/packages/target-ethers-v5/src/codegen/index.ts b/packages/target-ethers-v5/src/codegen/index.ts index 98416211..eeff53f2 100644 --- a/packages/target-ethers-v5/src/codegen/index.ts +++ b/packages/target-ethers-v5/src/codegen/index.ts @@ -1,4 +1,3 @@ -import { isString, values } from 'lodash' import { BytecodeWithLinkReferences, CodegenConfig, @@ -8,6 +7,7 @@ import { FunctionDeclaration, StructType, } from '@collabland/typechain' +import { isString, values } from 'lodash' import { FACTORY_POSTFIX, STRUCT_INPUT_POSTFIX } from '../common' import { diff --git a/packages/target-ethers-v5/src/codegen/structs.ts b/packages/target-ethers-v5/src/codegen/structs.ts index e9ba100e..5b81e53d 100644 --- a/packages/target-ethers-v5/src/codegen/structs.ts +++ b/packages/target-ethers-v5/src/codegen/structs.ts @@ -1,5 +1,5 @@ -import { groupBy } from 'lodash' import { StructName, StructType } from '@collabland/typechain' +import { groupBy } from 'lodash' import { STRUCT_INPUT_POSTFIX, STRUCT_OUTPUT_POSTFIX } from '../common' import { generateInputType, generateOutputType } from './types' diff --git a/packages/target-ethers-v5/src/codegen/types.ts b/packages/target-ethers-v5/src/codegen/types.ts index ada999ae..9421ec50 100644 --- a/packages/target-ethers-v5/src/codegen/types.ts +++ b/packages/target-ethers-v5/src/codegen/types.ts @@ -1,5 +1,5 @@ -import { compact } from 'lodash' import { AbiOutputParameter, AbiParameter, EvmOutputType, EvmType, TupleType } from '@collabland/typechain' +import { compact } from 'lodash' import { STRUCT_INPUT_POSTFIX, STRUCT_OUTPUT_POSTFIX } from '../common' diff --git a/packages/target-ethers-v5/src/index.ts b/packages/target-ethers-v5/src/index.ts index e9939cfb..04cd9eb1 100644 --- a/packages/target-ethers-v5/src/index.ts +++ b/packages/target-ethers-v5/src/index.ts @@ -1,7 +1,3 @@ -import { readFileSync } from 'fs' -import { compact, partition, uniqBy } from 'lodash' -import { join, relative, resolve } from 'path' -import { Dictionary } from 'ts-essentials' import { BytecodeWithLinkReferences, CodegenConfig, @@ -21,6 +17,10 @@ import { shortenFullJsonFilePath, TypeChainTarget, } from '@collabland/typechain' +import { readFileSync } from 'fs' +import { compact, partition, uniqBy } from 'lodash' +import { join, relative, resolve } from 'path' +import { Dictionary } from 'ts-essentials' import { codegenAbstractContractFactory, codegenContractFactory, codegenContractTypings } from './codegen' import { generateHardhatHelper } from './codegen/hardhat' diff --git a/packages/target-ethers-v5/test/generation.test.ts b/packages/target-ethers-v5/test/generation.test.ts index a0da289e..3a4c3075 100644 --- a/packages/target-ethers-v5/test/generation.test.ts +++ b/packages/target-ethers-v5/test/generation.test.ts @@ -1,5 +1,5 @@ -import { expect } from 'earljs' import { CodegenConfig, Contract, EventDeclaration, parse, RawAbiDefinition } from '@collabland/typechain' +import { expect } from 'earljs' import { codegenContractFactory } from '../src/codegen' import { generateEventFilters } from '../src/codegen/events' diff --git a/packages/target-ethers-v5/test/index.test.ts b/packages/target-ethers-v5/test/index.test.ts index 847a6ce1..637c0e76 100644 --- a/packages/target-ethers-v5/test/index.test.ts +++ b/packages/target-ethers-v5/test/index.test.ts @@ -1,6 +1,6 @@ +import { Config } from '@collabland/typechain' import { expect } from 'earljs' import { join } from 'path' -import { Config } from '@collabland/typechain' import EthersTarget from '../src/index' diff --git a/packages/target-ethers-v5/test/structs.test.ts b/packages/target-ethers-v5/test/structs.test.ts index 5b4bce08..651ebe7c 100644 --- a/packages/target-ethers-v5/test/structs.test.ts +++ b/packages/target-ethers-v5/test/structs.test.ts @@ -1,6 +1,6 @@ +import { StructName } from '@collabland/typechain' import { expect } from 'earljs' import { format } from 'prettier' -import { StructName } from '@collabland/typechain' import { generateStructTypes } from '../src/codegen/structs' diff --git a/packages/target-ethers-v6/src/codegen/index.ts b/packages/target-ethers-v6/src/codegen/index.ts index 9cbec1cb..847946c9 100644 --- a/packages/target-ethers-v6/src/codegen/index.ts +++ b/packages/target-ethers-v6/src/codegen/index.ts @@ -1,5 +1,4 @@ /* eslint-disable import/no-extraneous-dependencies */ -import { isString, values } from 'lodash' import { BytecodeWithLinkReferences, CodegenConfig, @@ -9,6 +8,7 @@ import { FunctionDeclaration, StructType, } from '@collabland/typechain' +import { isString, values } from 'lodash' import { FACTORY_POSTFIX, STRUCT_INPUT_POSTFIX } from '../common' import { diff --git a/packages/target-ethers-v6/src/codegen/structs.ts b/packages/target-ethers-v6/src/codegen/structs.ts index 7c036c2f..2e9aa02e 100644 --- a/packages/target-ethers-v6/src/codegen/structs.ts +++ b/packages/target-ethers-v6/src/codegen/structs.ts @@ -1,6 +1,6 @@ /* eslint-disable import/no-extraneous-dependencies */ -import { groupBy } from 'lodash' import { StructName, StructType } from '@collabland/typechain' +import { groupBy } from 'lodash' import { STRUCT_INPUT_POSTFIX, STRUCT_OUTPUT_POSTFIX } from '../common' import { generateInputType, generateOutputType } from './types' diff --git a/packages/target-ethers-v6/src/codegen/types.ts b/packages/target-ethers-v6/src/codegen/types.ts index 5161d353..4e4bfe90 100644 --- a/packages/target-ethers-v6/src/codegen/types.ts +++ b/packages/target-ethers-v6/src/codegen/types.ts @@ -1,6 +1,6 @@ /* eslint-disable import/no-extraneous-dependencies */ -import { compact } from 'lodash' import { AbiOutputParameter, AbiParameter, EvmOutputType, EvmType, TupleType } from '@collabland/typechain' +import { compact } from 'lodash' import { STRUCT_INPUT_POSTFIX, STRUCT_OUTPUT_POSTFIX } from '../common' import { reservedKeywordsLabels } from './reserved-keywords' diff --git a/packages/target-ethers-v6/src/index.ts b/packages/target-ethers-v6/src/index.ts index eae56773..e3eb2352 100644 --- a/packages/target-ethers-v6/src/index.ts +++ b/packages/target-ethers-v6/src/index.ts @@ -1,8 +1,4 @@ /* eslint-disable import/no-extraneous-dependencies */ -import { readFileSync } from 'fs' -import { compact, partition, uniqBy } from 'lodash' -import { join, relative, resolve } from 'path' -import { Dictionary } from 'ts-essentials' import { BytecodeWithLinkReferences, CodegenConfig, @@ -22,6 +18,10 @@ import { shortenFullJsonFilePath, TypeChainTarget, } from '@collabland/typechain' +import { readFileSync } from 'fs' +import { compact, partition, uniqBy } from 'lodash' +import { join, relative, resolve } from 'path' +import { Dictionary } from 'ts-essentials' import { codegenAbstractContractFactory, codegenContractFactory, codegenContractTypings } from './codegen' import { generateHardhatHelper } from './codegen/hardhat' diff --git a/packages/target-ethers-v6/test/generation.test.ts b/packages/target-ethers-v6/test/generation.test.ts index 26103882..873450ae 100644 --- a/packages/target-ethers-v6/test/generation.test.ts +++ b/packages/target-ethers-v6/test/generation.test.ts @@ -1,6 +1,6 @@ /* eslint-disable import/no-extraneous-dependencies */ -import { expect } from 'earljs' import { CodegenConfig, Contract, EventDeclaration, parse, RawAbiDefinition } from '@collabland/typechain' +import { expect } from 'earljs' import { codegenContractFactory } from '../src/codegen' import { generateEventTypeExport } from '../src/codegen/events' diff --git a/packages/target-ethers-v6/test/index.test.ts b/packages/target-ethers-v6/test/index.test.ts index 336e1cb4..4c018768 100644 --- a/packages/target-ethers-v6/test/index.test.ts +++ b/packages/target-ethers-v6/test/index.test.ts @@ -1,6 +1,6 @@ +import { Config } from '@collabland/typechain' import { expect } from 'earljs' import { join } from 'path' -import { Config } from '@collabland/typechain' import EthersTarget from '../src/index' diff --git a/packages/target-ethers-v6/test/structs.test.ts b/packages/target-ethers-v6/test/structs.test.ts index 468623fe..ad450fe4 100644 --- a/packages/target-ethers-v6/test/structs.test.ts +++ b/packages/target-ethers-v6/test/structs.test.ts @@ -1,6 +1,6 @@ +import { StructName } from '@collabland/typechain' import { expect } from 'earljs' import { format } from 'prettier' -import { StructName } from '@collabland/typechain' import { generateStructTypes } from '../src/codegen/structs' diff --git a/packages/test-e2e/test/ts-nocheck/ts-nocheck.test.ts b/packages/test-e2e/test/ts-nocheck/ts-nocheck.test.ts index ee36dec8..fb54ffa9 100644 --- a/packages/test-e2e/test/ts-nocheck/ts-nocheck.test.ts +++ b/packages/test-e2e/test/ts-nocheck/ts-nocheck.test.ts @@ -1,7 +1,7 @@ +import { runTypeChain } from '@collabland/typechain' import { expect } from 'earljs' import { readFile, remove } from 'fs-extra' import * as path from 'path' -import { runTypeChain } from '@collabland/typechain' describe('ts-nocheck', () => { it('is added to the top of the file, when "tsNocheck" config flag is "true"', async () => {