Skip to content

Commit

Permalink
Update to dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuanx committed Feb 18, 2024
1 parent 26ad9f5 commit b223e31
Show file tree
Hide file tree
Showing 10 changed files with 1,207 additions and 150 deletions.
84 changes: 84 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"ignorePatterns": [
"dist",
"node_modules"
],
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"],
"ecmaVersion": 12
},
"plugins": [
"@typescript-eslint",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"rules": {
"no-constructor-return": "error",
"no-duplicate-imports": "error",
"no-promise-executor-return": "error",
"no-self-compare": "error",
"no-unmodified-loop-condition": "error",
"no-unreachable-loop": "error",
"no-unused-private-class-members": "error",
"require-atomic-updates": "error",
"arrow-body-style": ["error", "as-needed"],
"block-scoped-var": "error",
"camelcase": ["error",{ "properties": "always" }],
"curly": ["error","all"],
"default-case": "error",
"default-case-last": "error",
"default-param-last": "error",
"dot-notation": "error",
"eqeqeq": "error",
"max-depth": ["error", { "max": 4 }],
"multiline-comment-style": ["error", "starred-block"],
"no-array-constructor": "error",
"no-bitwise": "error",
"no-console": "error",
"no-continue": "error",
"no-else-return": "error",
"no-eq-null": "error",
"no-extra-label": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-mixed-operators": "error",
"no-multi-assign": "error",
"no-negated-condition": "error",
"no-nested-ternary": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-shadow": "error",
"no-undefined": "error",
"no-useless-constructor": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "error",
"one-var-declaration-per-line": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"spaced-comment": "error",
"strict" : "error",
"arrow-spacing": "error",
"comma-spacing": ["error", { "before": false, "after": true }],
"eol-last": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{"checksConditionals": true,"checksVoidReturn": false}
],
"prettier/prettier": "error"
}
}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged && npm run build
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.sol": ["npm run lint:sol"],
"*.ts": ["npm run prettier:check"]
}
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# directories
broadcast
cache
coverage
node_modules
out

# files
*.env
*.log
.DS_Store
.pnp.*
lcov.info
pnpm-lock.yaml
18 changes: 18 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"overrides": [
{
"files": "*.ts",
"options": {
"arrowParens": "always",
"bracketSpacing": false,
"endOfLine": "lf",
"printWidth": 80,
"semi": false,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "none"
}
}
]
}
2 changes: 2 additions & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Dependency directories
node_modules
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

Foundry consists of:

- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.

## Documentation

Expand Down
27 changes: 20 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
"type": "git",
"url": "git+https://github.com/EthSign"
},
"husky": {
"hooks": {
"pre-commit": "forge fmt --check && solhint {script,src,test}/**/*.sol"
}
},
"scripts": {
"prepare": "husky",
"clean": "forge clean && hardhat clean && rm -rf cache_hardhat",
"build": "forge build",
"build:hh": "hardhat compile",
"lint:sol": "forge fmt --check && solhint {script,src,test}/**/*.sol",
"prettier:check": "prettier --check **/*.{json,md,yml} --ignore-path=.prettierignore",
"prettier:write": "prettier --write **/*.{json,md,yml} --ignore-path=.prettierignore",
"prettier:check": "prettier --check **/*.{json,md,yml,ts} --ignore-path=.prettierignore",
"prettier:write": "prettier --write **/*.{json,md,yml,ts} --ignore-path=.prettierignore",
"test": "forge test",
"test:coverage": "forge coverage",
"test:gas": "forge test --gas-report"
Expand All @@ -24,21 +30,28 @@
"@openzeppelin/contracts-upgradeable": "5.0.1"
},
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^2.0.6",
"@nomicfoundation/hardhat-foundry": "^1.1.1",
"@nomicfoundation/hardhat-toolbox-viem": "^2.0.0",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.4",
"@nomicfoundation/hardhat-viem": "^1.0.4",
"@openzeppelin/hardhat-upgrades": "^3.0.3",
"@types/node": ">=16.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"dotenv": "^16.4.4",
"ds-test": "github:dapphub/ds-test",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"ethers": "^6.11.1",
"forge-std": "github:foundry-rs/forge-std#v1",
"hardhat": "^2.20.1",
"hardhat-deploy": "^0.11.45",
"husky": "9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"solhint": "^4.1.1",
"solidity-docgen": "0.6.0-beta.36",
"ts-node": ">=8.0.0",
"typescript": "~5.0.4",
"viem": "^1.15.1"
"ts-node": "^10.9.2",
"typescript": "~5.0.4"
}
}
Loading

0 comments on commit b223e31

Please sign in to comment.