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

fix: monorepo ts configuration #258

Merged
merged 1 commit into from
Aug 13, 2024
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
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
/* eslint-disable @typescript-eslint/no-var-requires */
require("@nomicfoundation/hardhat-toolbox");
const dotenv = require("dotenv");
import "@nomicfoundation/hardhat-toolbox";
import * as dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/types";

const path = require("path");
import * as path from "path";

dotenv.config();

const parentDir = __dirname.includes("build") ? ".." : "";
const TEST_MNEMONIC = "test test test test test test test test test test test junk";

module.exports = {
const config: HardhatUserConfig = {
defaultNetwork: "localhost",
networks: {
localhost: {
url: process.env.COORDINATOR_RPC_URL,
url: process.env.COORDINATOR_RPC_URL || "",
accounts: {
mnemonic: TEST_MNEMONIC,
path: "m/44'/60'/0'/0",
Expand All @@ -31,3 +32,5 @@ module.exports = {
artifacts: path.resolve(__dirname, parentDir, "./node_modules/maci-contracts/build/artifacts"),
},
};

export default config;
3 changes: 1 addition & 2 deletions packages/coordinator/tests/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import {
mergeMessages,
mergeSignups,
} from "maci-cli";
import { Proof, TallyData } from "maci-contracts";
import { Poll__factory as PollFactory } from "maci-contracts/typechain-types";
import { Proof, TallyData, Poll__factory as PollFactory } from "maci-contracts";
import { Keypair } from "maci-domainobjs";
import { io, Socket } from "socket.io-client";
import request from "supertest";
Expand Down
2 changes: 1 addition & 1 deletion packages/coordinator/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"allowJs": true
},
"include": ["./ts", "./scripts", "./tests"],
"files": ["./hardhat.config.js"]
"files": ["./hardhat.config.ts"]
}
2 changes: 1 addition & 1 deletion packages/coordinator/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"experimentalDecorators": true
},
"include": ["./ts", "./scripts", "./tests"],
"files": ["hardhat.config.js"]
"files": ["hardhat.config.ts"]
}
12 changes: 5 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "Node16",
"lib": ["ESNext", "DOM"],
"strict": true,
"target": "ES2020",
"module": "commonjs",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node16",
"allowJs": true
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true
},
"exclude": ["node_modules"],
"include": ["packages/coordinator/ts", "packages/coordinator/scripts", "./packages/interface/src"]
Expand Down
Loading