Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: eslint enforce import order #194

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"plugin:prettier/recommended",
"plugin:jsdoc/recommended"
],
"plugins": ["@typescript-eslint", "prettier"],
"plugins": ["@typescript-eslint", "prettier", "import"],
"env": {
"node": true,
"es6": true
Expand All @@ -16,6 +16,7 @@
"sourceType": "module"
},
"rules": {
"import/first": "error",
"multiline-comment-style": ["error", "starred-block"],
"prettier/prettier": "error",
"@typescript-eslint/member-ordering": "error",
Expand Down
28 changes: 13 additions & 15 deletions cdp-langchain/examples/chatbot-typescript/chatbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ import { HumanMessage } from "@langchain/core/messages";
import * as dotenv from "dotenv";
import * as readline from "readline";

import {
AgentKit,
ViemWalletProvider,
cdpActionProvider,
erc721ActionProvider,
pythActionProvider,
walletActionProvider,
} from "@coinbase/cdp-agentkit-core";
import { createWalletClient, http } from "viem";
import { baseSepolia } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

dotenv.config();

/**
Expand All @@ -26,12 +38,11 @@ async function initializeAgent() {
});
const erc721 = erc721ActionProvider();
const pyth = pythActionProvider();
const twitter = twitterActionProvider();
const wallet = walletActionProvider();

const agentKit = new AgentKit({
walletProvider,
actionProviders: [cdp, erc721, pyth, twitter, wallet],
actionProviders: [cdp, erc721, pyth, wallet],
});
const actions = agentKit.getActions();
for (const action of actions) {
Expand Down Expand Up @@ -191,19 +202,6 @@ async function chooseMode(): Promise<"chat" | "auto"> {
}
}

import {
AgentKit,
ViemWalletProvider,
cdpActionProvider,
erc721ActionProvider,
pythActionProvider,
twitterActionProvider,
walletActionProvider,
} from "@coinbase/cdp-agentkit-core";
import { createWalletClient, http } from "viem";
import { baseSepolia } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(
"0x4c0883a69102937d6231471b5dbb6208ffd70c02a813d7f2da1c54f2e3be9f38",
);
Expand Down
Loading