Skip to content
Open
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
129 changes: 60 additions & 69 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,71 +1,62 @@
module.exports = {
root: true,
extends: ['next', 'next/core-web-vitals', 'prettier'],
plugins: ['@typescript-eslint'],
settings: {
next: {
rootDir: '.',
},
},
parserOptions: {
project: ['tsconfig.json'],
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'comma-dangle': ['error', 'always-multiline'],
'no-shadow': 'warn',
'@typescript-eslint/no-shadow': 'warn',
'react/no-children-prop': 'warn',
semi: ['error', 'never'],
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
disallowTypeAnnotations: false,
},
],
'import/order': [
'warn',
{
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
'newlines-between': 'always',
distinctGroup: false,
groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index']],
pathGroupsExcludedImportTypes: [],
pathGroups: [
{
pattern: 'react',
group: 'external',
position: 'before',
},
{
pattern: '{@/ui,@/ui/**,@/components,@/components/**}',
group: 'internal',
position: 'after',
},
{
pattern: '@/**',
group: 'internal',
},
{
pattern: '../**',
group: 'parent',
position: 'before',
},
{
pattern: '{./,.}',
group: 'index',
position: 'after',
},
],
},
],
quotes: ['warn', 'double', { avoidEscape: true }],
'react-hooks/exhaustive-deps': 'error',
'react/no-unescaped-entities': 'off',
},
root: true,
extends: ["next", "next/core-web-vitals", "prettier"],
plugins: ["@typescript-eslint"],
settings: {
next: {
rootDir: ".",
},
},
parserOptions: {
project: ["tsconfig.json"],
},
ignorePatterns: [".eslintrc.js"],
rules: {
"@typescript-eslint/consistent-type-imports": ["warn", {
disallowTypeAnnotations: false,
fixStyle: "inline-type-imports",
prefer: "type-imports"
}],
"@typescript-eslint/no-shadow": "warn",
"comma-dangle": ["error", "always-multiline"],
"import/order": ["warn", {
alphabetize: {
caseInsensitive: true,
order: "asc"
},
distinctGroup: false,
groups: ["builtin", "external", "internal", ["parent", "sibling", "index"]],
"newlines-between": "always",
pathGroups: [{
group: "external",
pattern: "react",
position: "before"
}, {
group: "internal",
pattern: "{@/ui,@/ui/**,@/components,@/components/**}",
position: "after"
}, {
group: "internal",
pattern: "@/**"
}, {
group: "parent",
pattern: "../**",
position: "before"
}, {
group: "index",
pattern: "{./,.}",
position: "after"
}],
pathGroupsExcludedImportTypes: []
}],
"indent": ["error", "tab", { SwitchCase: 1 }],
"no-shadow": "warn",
"quotes": ["warn", "double", {
avoidEscape: true
}],
"react-hooks/exhaustive-deps": "error",
"react/no-children-prop": "warn",
"react/no-unescaped-entities": "off",
"semi": ["error", "never"]
},
}
7 changes: 6 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# files with special formatting
src/hooks/useCursor.tsx
Cursor.tsx
src/hooks/useCursor.ts
src/hooks/useLessFormErrors.ts
src/hooks/useLessFormState.ts
src/hooks/useShallowState.ts
src/globals.d.ts
36 changes: 18 additions & 18 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": true,
"printWidth": 120,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"overrides": [],
"plugins": ["prettier-plugin-tailwindcss"]
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 120,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"useTabs": true,
"overrides": [],
"plugins": ["prettier-plugin-tailwindcss"]
}
47 changes: 20 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,33 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:
# Web3 Home assignments

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
This repository contains solutions to several home assignments.
Each resides in its own branch and has its own deployment. See [**main**](https://github.com/ackvf/web3-homework/tree/main) branch's README for all links or their respective READMEs for more relevant information.

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
- 129bit https://129bit.qwerty.art/

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
---

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
## Getting Started

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
First, install dependencies and get environment variables from example file.

## Learn More
```bash
pnpm install
```

To learn more about Next.js, take a look at the following resources:
Then run the development server:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
```bash
pnpm dev
```

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
### environment vartiables

## Deploy on Vercel
Get your free Alchemy API key https://dashboard.alchemy.com/apps/excputcq0ik8e7a1/setup and addit to [`.env.local`](.env.local) file. (Copy [`.env.sample`](.env.sample) and rename it to `.env.local`)

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
### Troubleshooting

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
- 🚨 `Cannot find module 'postcss-load-config' or its corresponding type declarations.` @ [postcss.config.mjs](./postcss.config.mjs)
👉 Install [`tsx`](https://www.npmjs.com/package/tsx) package.
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
reactStrictMode: false,
}

export default nextConfig
96 changes: 51 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,53 @@
{
"name": "homework",
"version": "0.1.0",
"private": true,
"packageManager": "pnpm@9.0.0",
"engines": {
"node": ">=20",
"pnpm": ">=9"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint:fix": "next lint --fix",
"format": "prettier --check --ignore-path .gitignore --ignore-path .prettierignore .",
"format:fix": "pnpm format --write",
"fix": "pnpm format:fix && pnpm lint:fix",
"types": "tsc --noEmit --incremental",
"types:watch": "tsc --noEmit --incremental --watch"
},
"dependencies": {
"@rainbow-me/rainbowkit": "^2.2.3",
"@tanstack/react-query": "^5.66.0",
"next": "14.2.7",
"react": "^18",
"react-dom": "^18",
"viem": "2.x",
"wagmi": "^2.14.10"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"eslint": "^8",
"eslint-config-next": "14.2.7",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.1.5",
"postcss": "^8",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.6",
"tailwind-merge": "^2.5.2",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
"name": "homework",
"version": "0.1.0",
"private": true,
"packageManager": "pnpm@9.0.0",
"engines": {
"node": ">=20",
"pnpm": ">=9"
},
"scripts": {
"dev": "next dev",
"dev:ws": "tsx --watch --no-cache ./src/server.ts",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint:fix": "next lint --fix",
"format": "prettier --check --ignore-path .gitignore --ignore-path .prettierignore .",
"format:fix": "pnpm format --write",
"fix": "pnpm format:fix && pnpm lint:fix",
"types": "tsc --noEmit --incremental",
"types:watch": "tsc --noEmit --incremental --watch"
},
"dependencies": {
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-switch": "^1.2.5",
"clsx": "^2.1.1",
"next": "14.2.7",
"react": "^18",
"react-dom": "^18",
"ws": "^8.18.2"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/ws": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"eslint": "^8",
"eslint-config-next": "14.2.7",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.1.7",
"postcss": "^8",
"postcss-load-config": "^6.0.1",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.12",
"tailwind-merge": "^3.3.1",
"tailwindcss": "^3.4.1",
"typescript": "^5"
},
"peerDependencies": {
"tsx": "*"
}
}
Loading