diff --git a/components/drops/create/compact/CreateDropCompact.tsx b/components/drops/create/compact/CreateDropCompact.tsx index 38c20ac23b..a9ebe491bd 100644 --- a/components/drops/create/compact/CreateDropCompact.tsx +++ b/components/drops/create/compact/CreateDropCompact.tsx @@ -1,24 +1,22 @@ "use client"; -import { CreateDropScreenType } from "../utils/CreateDropWrapper"; -import type { - CreateDropContentHandles, -} from "../utils/CreateDropContent"; -import CreateDropContent from "../utils/CreateDropContent"; -import type { EditorState } from "lexical"; +import PrimaryButton from "@/components/utils/button/PrimaryButton"; import type { CreateDropConfig, MentionedUser, ReferencedNft, } from "@/entities/IDrop"; -import PrimaryButton from "@/components/utils/button/PrimaryButton"; -import CreateDropSelectedFileIcon from "../utils/file/CreateDropSelectedFileIcon"; -import { CreateDropType, CreateDropViewType } from "../types"; -import { assertUnreachable } from "@/helpers/AllowlistToolHelpers"; -import CreateDropSelectedFilePreview from "../utils/file/CreateDropSelectedFilePreview"; -import { forwardRef, useImperativeHandle, useRef } from "react"; import type { ApiWaveParticipationRequirement } from "@/generated/models/ApiWaveParticipationRequirement"; import type { ApiWaveRequiredMetadata } from "@/generated/models/ApiWaveRequiredMetadata"; +import { assertUnreachable } from "@/helpers/AllowlistToolHelpers"; +import type { EditorState } from "lexical"; +import { forwardRef, useImperativeHandle, useRef } from "react"; +import { CreateDropType, CreateDropViewType } from "../types"; +import type { CreateDropContentHandles } from "../utils/CreateDropContent"; +import CreateDropContent from "../utils/CreateDropContent"; +import { CreateDropScreenType } from "../utils/CreateDropWrapper"; +import CreateDropSelectedFileIcon from "../utils/file/CreateDropSelectedFileIcon"; +import CreateDropSelectedFilePreview from "../utils/file/CreateDropSelectedFilePreview"; export interface CreateDropCompactHandles { clearEditorState: () => void; @@ -114,10 +112,10 @@ const CreateDropCompact = forwardRef< })); return ( -
+
{children}
-
+
(
-
+
-

+

{file.name}

@@ -175,10 +173,10 @@ const CreateDropCompact = forwardRef< onClick={() => onFileRemove(file)} type="button" aria-label="Remove file" - className="-tw-mb-0.5 tw-h-8 tw-w-8 tw-flex tw-items-center tw-justify-center tw-bg-transparent tw-border-0 tw-rounded-full hover:tw-bg-iron-800" + className="-tw-mb-0.5 tw-flex tw-size-8 tw-items-center tw-justify-center tw-rounded-full tw-border-0 tw-bg-transparent hover:tw-bg-iron-800" >
{isAmountExceeded && ( -

- Amount exceeds your available grant rate ({formatNumberWithCommas(Math.floor(maxGrantRate! * 10) / 10)}). +

+ Amount exceeds your available grant rate ( + {formatNumberWithCommas(Math.floor(maxGrantRate * 10) / 10)}).

)} {errorMessage && ( -

+

{errorMessage}

)} {!errorMessage && successMessage && ( - + {successMessage} )} diff --git a/package-lock.json b/package-lock.json index 9a5475a658..edef123e39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -137,7 +137,6 @@ "eslint-config-prettier": "^10.1.8", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-perfectionist": "^5.1.0", "eslint-plugin-promise": "^7.2.1", "eslint-plugin-react-compiler": "^19.1.0-rc.2", "eslint-plugin-react-hooks": "^7.0.1", @@ -16140,177 +16139,6 @@ "node": "*" } }, - "node_modules/eslint-plugin-perfectionist": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-5.1.0.tgz", - "integrity": "sha512-SXSQni0xi+HjfjnNpjQ3nBLRalus2Sl+Z0cT9tPT/e5biAEynQ/dezeaRpiR2rlR5yke+mNYS1XZXdS84vynMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/utils": "^8.50.1", - "natural-orderby": "^5.0.0" - }, - "engines": { - "node": "^20.0.0 || >=22.0.0" - }, - "peerDependencies": { - "eslint": ">=8.45.0" - } - }, - "node_modules/eslint-plugin-perfectionist/node_modules/@typescript-eslint/project-service": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.51.0.tgz", - "integrity": "sha512-Luv/GafO07Z7HpiI7qeEW5NW8HUtZI/fo/kE0YbtQEFpJRUuR0ajcWfCE5bnMvL7QQFrmT/odMe8QZww8X2nfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.51.0", - "@typescript-eslint/types": "^8.51.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/eslint-plugin-perfectionist/node_modules/@typescript-eslint/scope-manager": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.51.0.tgz", - "integrity": "sha512-JhhJDVwsSx4hiOEQPeajGhCWgBMBwVkxC/Pet53EpBVs7zHHtayKefw1jtPaNRXpI9RA2uocdmpdfE7T+NrizA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.51.0", - "@typescript-eslint/visitor-keys": "8.51.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-perfectionist/node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.51.0.tgz", - "integrity": "sha512-Qi5bSy/vuHeWyir2C8u/uqGMIlIDu8fuiYWv48ZGlZ/k+PRPHtaAu7erpc7p5bzw2WNNSniuxoMSO4Ar6V9OXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/eslint-plugin-perfectionist/node_modules/@typescript-eslint/types": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.51.0.tgz", - "integrity": "sha512-TizAvWYFM6sSscmEakjY3sPqGwxZRSywSsPEiuZF6d5GmGD9Gvlsv0f6N8FvAAA0CD06l3rIcWNbsN1e5F/9Ag==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-perfectionist/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.51.0.tgz", - "integrity": "sha512-1qNjGqFRmlq0VW5iVlcyHBbCjPB7y6SxpBkrbhNWMy/65ZoncXCEPJxkRZL8McrseNH6lFhaxCIaX+vBuFnRng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.51.0", - "@typescript-eslint/tsconfig-utils": "8.51.0", - "@typescript-eslint/types": "8.51.0", - "@typescript-eslint/visitor-keys": "8.51.0", - "debug": "^4.3.4", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/eslint-plugin-perfectionist/node_modules/@typescript-eslint/utils": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.51.0.tgz", - "integrity": "sha512-11rZYxSe0zabiKaCP2QAwRf/dnmgFgvTmeDTtZvUvXG3UuAdg/GU02NExmmIXzz3vLGgMdtrIosI84jITQOxUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.51.0", - "@typescript-eslint/types": "8.51.0", - "@typescript-eslint/typescript-estree": "8.51.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/eslint-plugin-perfectionist/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.51.0.tgz", - "integrity": "sha512-mM/JRQOzhVN1ykejrvwnBRV3+7yTKK8tVANVN3o1O0t0v7o+jqdVu9crPy5Y9dov15TJk/FTIgoUGHrTOVL3Zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.51.0", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-perfectionist/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-plugin-promise": { "version": "7.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-7.2.1.tgz", @@ -24633,16 +24461,6 @@ "dev": true, "license": "MIT" }, - "node_modules/natural-orderby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/natural-orderby/-/natural-orderby-5.0.0.tgz", - "integrity": "sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", diff --git a/package.json b/package.json index b33cb2cbdb..e3b181e4d2 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,8 @@ "lint:single": "npx eslint --config eslint.config.single.mjs", "format": "prettier --write .", "format:check": "prettier --check .", + "format:changed": "bash -lc '{ git diff --name-only -z main...HEAD -- \"*.js\" \"*.jsx\" \"*.ts\" \"*.tsx\" \"*.json\" \"*.css\" \"*.scss\" \":(exclude)generated/**\"; git ls-files --others --exclude-standard -z -- \"*.js\" \"*.jsx\" \"*.ts\" \"*.tsx\" \"*.json\" \"*.css\" \"*.scss\" \":(exclude)generated/**\"; } | xargs -0 prettier --write --ignore-unknown'", + "format:uncommitted": "bash -lc '{ git diff --name-only -z HEAD -- \"*.js\" \"*.jsx\" \"*.ts\" \"*.tsx\" \"*.json\" \"*.css\" \"*.scss\" \":(exclude)generated/**\"; git ls-files --others --exclude-standard -z -- \"*.js\" \"*.jsx\" \"*.ts\" \"*.tsx\" \"*.json\" \"*.css\" \"*.scss\" \":(exclude)generated/**\"; } | xargs -0 prettier --write --ignore-unknown'", "deadcode:knip": "knip", "deadcode:exports": "ts-prune -p tsconfig.ts-prune.json --error", "deadcode:deps": "depcheck --ignores=\"eslint,eslint-*,@types/*,jest,ts-jest,playwright,@playwright/test,tailwindcss,postcss,autoprefixer\" --ignore-patterns=\".next,coverage,public,generated,tmp_gen_outp\"", diff --git a/prettier.config.mjs b/prettier.config.mjs index 4d55141829..ac07228594 100644 --- a/prettier.config.mjs +++ b/prettier.config.mjs @@ -40,6 +40,15 @@ const config = { // Plugins // ============================================================================= plugins: ["prettier-plugin-tailwindcss"], + tailwindFunctions: ["clsx", "cn", "cva"], + tailwindAttributes: [ + "enter", + "enterFrom", + "enterTo", + "leave", + "leaveFrom", + "leaveTo", + ], }; export default config; diff --git a/scripts/example_prd.txt b/scripts/example_prd.txt deleted file mode 100644 index 194114d002..0000000000 --- a/scripts/example_prd.txt +++ /dev/null @@ -1,47 +0,0 @@ - -# Overview -[Provide a high-level overview of your product here. Explain what problem it solves, who it's for, and why it's valuable.] - -# Core Features -[List and describe the main features of your product. For each feature, include: -- What it does -- Why it's important -- How it works at a high level] - -# User Experience -[Describe the user journey and experience. Include: -- User personas -- Key user flows -- UI/UX considerations] - - -# Technical Architecture -[Outline the technical implementation details: -- System components -- Data models -- APIs and integrations -- Infrastructure requirements] - -# Development Roadmap -[Break down the development process into phases: -- MVP requirements -- Future enhancements -- Do not think about timelines whatsoever -- all that matters is scope and detailing exactly what needs to be build in each phase so it can later be cut up into tasks] - -# Logical Dependency Chain -[Define the logical order of development: -- Which features need to be built first (foundation) -- Getting as quickly as possible to something usable/visible front end that works -- Properly pacing and scoping each feature so it is atomic but can also be built upon and improved as development approaches] - -# Risks and Mitigations -[Identify potential risks and how they'll be addressed: -- Technical challenges -- Figuring out the MVP that we can build upon -- Resource constraints] - -# Appendix -[Include any additional information: -- Research findings -- Technical specifications] - \ No newline at end of file diff --git a/scripts/wt-add.sh b/scripts/wt-add.sh index 0eca12d287..4e27e212f9 100755 --- a/scripts/wt-add.sh +++ b/scripts/wt-add.sh @@ -38,7 +38,74 @@ cat > "$WORKTREE_PATH/settings.json" < "../$WORKTREE_NAME/.hooks/pre-commit" <<'HOOK' #!/bin/sh +if [ "$SKIP_LINT" = "1" ]; then + echo "Skipping lint (SKIP_LINT=1)" + exit 0 +fi +npm run format:uncommitted +git add -u npm run lint:uncommitted:tight HOOK chmod +x "../$WORKTREE_NAME/.hooks/pre-commit"