Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

Commit 3e4ee2e

Browse files
#238/monorepo (#241)
* #238 zod validation to eth-hooks. foundry types for contract validattion. renamed types. changed package major version * #238 moved aroudn models, added forge types * #238 finshed forge broadcast types * #238 updates to validation of contract json * #238 updates to abi loading * #238 fixes to types * #93 minor changes to foundry connectors * #238 updates to connectors for foundry * update build minification * #238 mono repo * #238 mono repo updats
1 parent bae1926 commit 3e4ee2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+712
-74
lines changed

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
{ "directory": "packages/*", "changeProcessCWD": true },
3535
{ "directory": "packages/eth-hooks", "changeProcessCWD": true },
3636
{ "directory": "packages/docusaurus", "changeProcessCWD": true },
37-
{ "directory": "packages/eth-headless", "changeProcessCWD": true }
37+
{ "directory": "packages/wagmi-headless", "changeProcessCWD": true }
38+
{ "directory": "packages/wagmi-tailwind", "changeProcessCWD": true }
3839
]
3940
}

package.json

+9-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
],
1111
"scripts": {
1212
"eth-hooks": "yarn workspace eth-hooks",
13-
"eth-headless": "yarn workspace eth-headless",
13+
"wagmi-headless": "yarn workspace wagmi-headless",
14+
"wagmi-tailwind": "yarn workspace wagmi-tailwind",
1415
"docs": "yarn workspace documentation",
1516
"postinstall": "husky install",
1617
"lint": "yarn eth-hooks lint && yarn docs lint",
@@ -45,9 +46,13 @@
4546
"yarn workspace eth-hooks lint --fix",
4647
"yarn workspace eth-hooks format"
4748
],
48-
"packages/eth-headless/**/*.{ts,tsx}": [
49-
"yarn workspace eth-headless lint --fix",
50-
"yarn workspace eth-headless format"
49+
"packages/wagmi-headless/**/*.{ts,tsx}": [
50+
"yarn wagmi-headless lint --fix",
51+
"yarn wagmi-headless format"
52+
],
53+
"packages/wagmi-tailwind/**/*.{ts,tsx}": [
54+
"yarn wagmi-tailwind lint --fix",
55+
"yarn wagmi-tailwind format"
5156
],
5257
"packages/docusaurus/src/**/*.{ts,tsx,js,jsx}": [
5358
"npm run lint --fix",

packages/eth-headless/src/components/eth-balance/index.ts

-1
This file was deleted.

packages/eth-headless/src/index.ts

-1
This file was deleted.

packages/eth-hooks/tsup.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineConfig } from 'tsup';
22

33
export default defineConfig({
44
entryPoints: [
5+
'./src/index.ts',
56
'./src/index.ts',
67
'./src/dapps.ts',
78
'./src/erc.ts',
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/wagmi-headless/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# 🖇 wagmi-headless Overview
2+
3+
Commonly used Ethereum hooks to supercharge your web3 dev!
4+
5+
Used by 🏭 [scaffold-eth-typescript](https://github.com/scaffold-eth/scaffold-eth-typescript), 🏗 [scaffold-eth](https://github.com/scaffold-eth/scaffold-eth)
6+
, [eth-components](https://github.com/scaffold-eth/eth-components) and many other web3 projects!
7+
8+
Created by 🏰 [BuidlGuidl.eth](https://BuidlGuidl.com)
9+
10+
## Author
11+
12+
# Documentation
13+
14+
## 📚 Check out the documentation at [Eth-hooks-documentation](https://scaffold-eth.github.io/eth-ui/)
15+
16+
# Features
17+
18+
## Hooks!
File renamed without changes.

packages/eth-headless/package.json packages/wagmi-headless/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "eth-headless",
2+
"name": "wagmi-headless",
33
"version": "0.1.1-beta0",
44
"description": "A base for building web3 components",
5-
"repository": "https://github.com/scaffold-eth/eth-headless.git",
5+
"repository": "https://github.com/scaffold-eth/eth-ui.git",
66
"main": "index.js",
77
"module": "./esm/index.js",
88
"browser": {

packages/wagmi-headless/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './hooks/useEthBalance';
File renamed without changes.
File renamed without changes.

packages/wagmi-tailwind/.eslintignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# folders
2+
lib/
3+
node_modules/**/*
4+
**/*.md
5+
docs/**/*
6+
website/**/*
7+
build/**/*

packages/wagmi-tailwind/.eslintrc

+176
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
{
2+
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser
3+
"root": true,
4+
"parserOptions": {
5+
"ecmaVersion": 2020, // Allows for the parsing of modern ECMAScript features
6+
"sourceType": "module", // Allows for the use of imports,
7+
"ecmaFeatures": {
8+
"jsx": true // Allows for the parsing of JSX
9+
},
10+
"project": "tsconfig.json",
11+
"tsconfigRootDir": ".",
12+
"projectFolderIgnoreList": [
13+
"node_modules/*",
14+
"node_modules",
15+
"dist",
16+
"lib",
17+
"build",
18+
".yarn",
19+
"build-utils",
20+
"docs"
21+
]
22+
},
23+
"env": {
24+
"browser": true,
25+
"es6": true,
26+
"node": true
27+
},
28+
"extends": [
29+
"plugin:import/errors",
30+
"plugin:import/warnings",
31+
"plugin:import/typescript",
32+
"plugin:react-hooks/recommended",
33+
"plugin:react/recommended",
34+
"plugin:prettier/recommended",
35+
"plugin:@typescript-eslint/eslint-recommended",
36+
"plugin:@typescript-eslint/recommended",
37+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
38+
"plugin:mocha/recommended"
39+
],
40+
"plugins": ["prettier", "react", "react-hooks", "unused-imports", "testing-library", "mocha"],
41+
"rules": {
42+
"eqeqeq": ["error", "smart"],
43+
"react/jsx-wrap-multilines": "warn",
44+
"react/jsx-uses-react": "off",
45+
"react/react-in-jsx-scope": "off",
46+
"react/jsx-filename-extension": "off",
47+
"react/jsx-indent": "off",
48+
"react/require-default-props": "off",
49+
"react/jsx-one-expression-per-line": "off",
50+
"react/jsx-closing-tag-location": "off",
51+
"react/jsx-indent-props": "off",
52+
"react/jsx-closing-bracket-location": "off",
53+
"react/prop-types": "off",
54+
"react-hooks/rules-of-hooks": "error",
55+
"react-hooks/exhaustive-deps": [
56+
"warn",
57+
{
58+
"additionalHooks": "(useRecoilCallback)"
59+
}
60+
],
61+
"prettier/prettier": [
62+
"warn",
63+
{
64+
"endOfLine": "auto"
65+
}
66+
],
67+
"@typescript-eslint/ban-ts-comment": [
68+
"warn",
69+
{
70+
"ts-expect-error": false,
71+
"ts-ignore": true,
72+
"ts-nocheck": false,
73+
"ts-check": false
74+
}
75+
],
76+
"@typescript-eslint/no-empty-function": "warn",
77+
"no-unused-vars": "off",
78+
"@typescript-eslint/no-unused-vars": "off",
79+
"unused-imports/no-unused-imports-ts": "warn",
80+
"unused-imports/no-unused-vars-ts": [
81+
"error",
82+
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
83+
],
84+
"@typescript-eslint/no-use-before-define": ["error"],
85+
"@typescript-eslint/no-inferrable-types": "off",
86+
"@typescript-eslint/no-unsafe-assignment": "warn",
87+
"@typescript-eslint/no-explicit-any": "off",
88+
"@typescript-eslint/no-unsafe-call": "warn",
89+
"@typescript-eslint/explicit-function-return-type": "error",
90+
"@typescript-eslint/unbound-method": "off",
91+
"@typescript-eslint/no-unsafe-member-access": "warn",
92+
"@typescript-eslint/restrict-template-expressions": ["error", { "allowBoolean": true, "allowNumber": true }],
93+
"prefer-destructuring": "off",
94+
"prefer-template": "off",
95+
"react/destructuring-assignment": "off",
96+
"no-param-reassign": "error",
97+
"import/order": [
98+
"warn",
99+
{
100+
"alphabetize": {
101+
"order": "asc" /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
102+
"caseInsensitive": true /* ignore case. Options: [true, false] */
103+
},
104+
"newlines-between": "always"
105+
}
106+
],
107+
"no-duplicate-imports": "warn",
108+
"import/named": "off",
109+
"import/namespace": "off",
110+
"import/default": "off",
111+
"import/no-named-as-default-member": "error",
112+
"import/extensions": "off",
113+
"import/no-unresolved": "off",
114+
"import/prefer-default-export": "off",
115+
"import/no-unused-modules": ["off"],
116+
"import/no-unassigned-import": "off",
117+
"import/no-extraneous-dependencies": [
118+
"error",
119+
{
120+
"devDependencies": true,
121+
"optionalDependencies": false,
122+
"peerDependencies": false
123+
}
124+
],
125+
"no-underscore-dangle": [
126+
"off",
127+
{
128+
"allow": ["obj"],
129+
"allowFunctionParams": false,
130+
"allowAfterSuper": true,
131+
"allowAfterThis": true,
132+
"allowAfterThisConstructor": true,
133+
"enforceInMethodNames": true
134+
}
135+
],
136+
"sort-keys": "off",
137+
"comma-dangle": "off",
138+
"@typescript-eslint/comma-dangle": ["off"],
139+
"no-use-before-define": "off",
140+
"spaced-comment": "warn",
141+
"max-len": "off",
142+
"indent": "off",
143+
"no-console": "off",
144+
"arrow-body-style": "off",
145+
"no-multiple-empty-lines": "warn",
146+
"no-restricted-globals": "off",
147+
"eslint linebreak-style": "off",
148+
"object-curly-newline": "off",
149+
"no-shadow": "off",
150+
"no-void": ["error", { "allowAsStatement": true }],
151+
"mocha/no-mocha-arrows": "off",
152+
"mocha/no-hooks-for-single-case": "off",
153+
"mocha/max-top-level-suites": ["warn", { "limit": 3 }]
154+
},
155+
"overrides": [
156+
{
157+
"files": ["*.test.ts", "*.test.tsx"],
158+
"rules": {
159+
"@typescript-eslint/no-non-null-assertion": "off"
160+
}
161+
}
162+
],
163+
"settings": {
164+
"react": {
165+
"createClass": "createReactClass", // Regex for Component Factory to use,
166+
// default to "createReactClass"
167+
"pragma": "React", // Pragma to use, default to "React"
168+
"fragment": "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
169+
"version": "detect" // React version. "detect" automatically picks the version you have installed.
170+
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
171+
// default to latest and warns if missing
172+
// It will default to "detect" in the future
173+
}
174+
},
175+
"reportUnusedDisableDirectives": true
176+
}

packages/wagmi-tailwind/.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# folders
2+
lib/
3+
node_modules/
4+
5+
*.log
6+
*.tgz
7+
*.tsbuildinfo
8+
cache
9+
test/testresult.xml
10+
testresult.xml
11+
.yarn/install-state.gz
12+
test-files/__mocks__/generated
13+
.idea
14+
.DS_store
15+
eslint_report.json

packages/wagmi-tailwind/.mocharc.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
console.log('load .mocharc.js config');
2+
3+
module.exports = {
4+
require: ['ts-node/register', 'ts-node/register/files', 'tsconfig-paths/register', 'global-jsdom/register'],
5+
timeout: 30000,
6+
bail: false,
7+
allowUncaught: false,
8+
reporter: process.env.GITHUB_ACTIONS === 'true' ? 'mocha-junit-reporter' : 'spec',
9+
reporterOptions: {
10+
mochaFile: 'testresult.xml',
11+
},
12+
extension: ['js', 'ts', 'tsx', 'jsx'],
13+
spec: ['test/**/*'],
14+
parallel: false,
15+
recursive: true,
16+
jobs: 1,
17+
};

packages/wagmi-tailwind/.npmignore

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#folders
2+
src
3+
4+
#files
5+
.commitlintrc.js
6+
.eslintignore
7+
.eslintrc.js
8+
.gitignore
9+
.huskyrc.js
10+
.lintstagedrc.js
11+
.prettierrc
12+
tsconfig.json
13+
yarn.lock
14+
15+
*.log
16+
*.tgz

packages/wagmi-tailwind/.prettierrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSpacing": true,
4+
"printWidth": 120,
5+
"requirePragma": false,
6+
"singleQuote": true,
7+
"tabWidth": 2,
8+
"trailingComma": "es5",
9+
"endOfLine": "lf",
10+
"bracketSameLine": true
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"mochaExplorer.files": "test/**/*.{j,t}s",
3+
"mochaExplorer.parallel": true,
4+
"mochaExplorer.timeout": 20000,
5+
"mochaExplorer.configFile": "./mocharc.json",
6+
"mochaExplorer.esmLoader": false,
7+
"terminal.integrated.fontSize": 12,
8+
"editor.tabSize": 2,
9+
"mochaExplorer.optsFile": "",
10+
"search.useIgnoreFiles": true,
11+
"files.exclude": {
12+
"**/.git": true,
13+
"**/.svn": true,
14+
"**/.hg": true,
15+
"**/CVS": true,
16+
"**/.DS_Store": true,
17+
"**/Thumbs.db": true,
18+
"**/.cache": true,
19+
"**/.vs/": true,
20+
"**/*.cs": true,
21+
"**/*.orig": true,
22+
"**/bin/": true,
23+
"**/build/": true,
24+
"**/build/**/*": true,
25+
"**/debug/": true,
26+
"**/dist/": true,
27+
"**/obj": true,
28+
"lib": true
29+
},
30+
"explorerExclude.backup": null,
31+
"exportall.config.relExclusion": ["/src/helpers/test-utils", "/src/helpers/typedoc", "/src/helpers/__global.ts"]
32+
}
File renamed without changes.
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// shim.js
2+
import * as React from 'react';
3+
export { React };
4+
export { jsx as _jsx } from 'react/jsx-runtime';

0 commit comments

Comments
 (0)