From 3f9cec1503ccc5808f711e7e15911a1086cb7d8d Mon Sep 17 00:00:00 2001 From: Vu Nguyen Date: Sun, 7 Jan 2024 01:39:14 -0800 Subject: [PATCH] chore: add sorting json prettier Signed-off-by: Vu Nguyen --- .github/ISSUE_TEMPLATE/feature_request.yml | 1 - .husky/pre-push | 1 + .lintstagedrc.mjs | 1 + .prettierignore | 11 +++ apps/perf-extension/index.html | 16 +++- apps/perf-extension/package.json | 4 +- apps/vubnguyen/package.json | 20 ++--- package.json | 7 +- packages/api/package.json | 16 ++-- packages/auth/package.json | 16 ++-- packages/config/eslint/package.json | 8 +- packages/db/package.json | 6 +- packages/vujita-ui/package.json | 92 +++++++++++----------- packages/vujita-ui/stories/Configure.mdx | 51 ++++++------ pnpm-lock.yaml | 81 +++++++++++++++++++ prettier.config.mjs | 2 +- 16 files changed, 221 insertions(+), 112 deletions(-) create mode 100644 .prettierignore diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index ae1ccf2d..c2be403e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -26,4 +26,3 @@ body: attributes: label: Additional information description: Add any other information related to the feature here. If your feature request is related to any issues or discussions, link them here. - diff --git a/.husky/pre-push b/.husky/pre-push index 718e1382..ab51cfb6 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -3,3 +3,4 @@ pnpm manypkg check pnpm turbo run build lint type-check test e2e +pnpm run check diff --git a/.lintstagedrc.mjs b/.lintstagedrc.mjs index 212c529c..b76152b9 100644 --- a/.lintstagedrc.mjs +++ b/.lintstagedrc.mjs @@ -3,6 +3,7 @@ export default { "pnpm-workspace.yaml": ["prettier --write", "git add"], "*.{css}": ["prettier --write", "git add"], "*.{mjs,json}": ["prettier --write", "git add"], + "*.{html}": ["prettier --write", "git add"], "*.{js,jsx,ts,tsx,cjs,mjs,md}": ["prettier --write --list-different", "git add"], "{apps,packages}/**/*.{js,jsx,ts,tsx,cjs,mjs,md}": ["prettier --write --list-different", "eslint --fix", "git add"], }; diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..204a2eb1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,11 @@ +*.md +packages/vujita-ui/*.js +packages/vujita-ui/*.d.ts +packages/vujita-ui/*.ts +packages/vujita-ui/*.mts +packages/vujita-ui/*.d.mts +packages/vujita-ui/*.mjs +test-results/ +playwright-report/ +playwright/.cache/ +pnpm-lock.yaml diff --git a/apps/perf-extension/index.html b/apps/perf-extension/index.html index e4b78eae..e4c1f3de 100644 --- a/apps/perf-extension/index.html +++ b/apps/perf-extension/index.html @@ -2,12 +2,22 @@ - - + + Vite + React + TS
- + diff --git a/apps/perf-extension/package.json b/apps/perf-extension/package.json index 7cad464a..27c59f90 100644 --- a/apps/perf-extension/package.json +++ b/apps/perf-extension/package.json @@ -1,11 +1,11 @@ { "name": "perf-extension", - "private": true, "version": "0.0.0", + "private": true, "type": "module", "scripts": { - "dev": "vite", "build": "tsc && vite build", + "dev": "vite", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, diff --git a/apps/vubnguyen/package.json b/apps/vubnguyen/package.json index 0691403e..4b91bd96 100644 --- a/apps/vubnguyen/package.json +++ b/apps/vubnguyen/package.json @@ -6,14 +6,22 @@ "build": "rm -rf .next && pnpm with-env next build", "clean": "git clean -xdf .next .turbo node_modules", "dev": "pnpm with-env next dev", + "dev:preview": "pnpm with-env next start", + "e2e": "pnpm with-env playwright test", "lint": "dotenv -v SKIP_ENV_VALIDATION=1 next lint", "lint:fix": "pnpm lint -- --fix", - "dev:preview": "pnpm with-env next start", "start": "pnpm with-env next start", "type-check": "tsc --noEmit", - "e2e": "pnpm with-env playwright test", "with-env": "dotenv -e ../../.env --" }, + "eslintConfig": { + "extends": [ + "eslint-config-vujita/base", + "eslint-config-vujita/nextjs", + "eslint-config-vujita/react" + ], + "root": true + }, "dependencies": { "@fortawesome/free-solid-svg-icons": "6.4.2", "@fortawesome/react-fontawesome": "0.2.0", @@ -51,13 +59,5 @@ "postcss": "8.4.31", "tailwindcss": "3.3.2", "typescript": "5.1.6" - }, - "eslintConfig": { - "root": true, - "extends": [ - "eslint-config-vujita/base", - "eslint-config-vujita/nextjs", - "eslint-config-vujita/react" - ] } } diff --git a/package.json b/package.json index 6a25e82e..9f4acb53 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "scripts": { "build": "turbo build", "build:storybook": "turbo build:storybook", - "check": "prettier --check \"**/*.{js,cjs,mjs,ts,tsx,md,json}\" --ignore-path .gitignore --ignore-path .eslintignore", + "check": "prettier --check \"**/*.{js,cjs,mjs,ts,tsx,md,json,html}\"", "clean": "git clean -xdf node_modules", "clean:workspaces": "pnpx turbo clean", "db:generate": "turbo db:generate", @@ -12,12 +12,12 @@ "db:push": "turbo db:push", "db:studio": "pnpm -F db dev", "dev": "turbo dev --parallel", - "dev:preview": "turbo dev:preview", "dev:db": "turbo dev --filter db", "dev:extension": "turbo dev --filter perf-extension", + "dev:preview": "turbo dev:preview", "dev:storybook": "turbo dev:storybook --parallel", "dev:vubnguyen": "turbo dev --filter vubnguyen --filter vujita-ui", - "format": "prettier --write \"**/*.{css,js,cjs,mjs,ts,tsx,md,json}\" --ignore-path .gitignore --ignore-path .eslintignore", + "format": "prettier --write \"**/*.{css,js,cjs,mjs,ts,tsx,md,json,html}\"", "lint": "turbo lint && manypkg check", "lint:fix": "turbo lint:fix && manypkg fix", "manypkg:check": "manypkg check", @@ -40,6 +40,7 @@ "lerna": "7.1.5", "lint-staged": "13.2.3", "prettier": "3.0.0", + "prettier-plugin-packagejson": "2.4.9", "prettier-plugin-sort-json": "3.0.1", "prettier-plugin-tailwindcss": "0.4.1", "turbo": "1.10.14", diff --git a/packages/api/package.json b/packages/api/package.json index 1792703d..4d0aabfa 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,16 +1,22 @@ { "name": "@vujita/api", - "private": true, "version": "0.0.3-alpha.0", + "private": true, + "license": "MIT", "main": "./index.ts", "types": "./index.ts", - "license": "MIT", "scripts": { "clean": "rimraf .turbo node_modules", "lint": "eslint .", "lint:fix": "pnpm lint --fix", "type-check": "tsc --noEmit" }, + "eslintConfig": { + "extends": [ + "eslint-config-vujita/base" + ], + "root": true + }, "dependencies": { "@trpc/client": "10.34.0", "@trpc/server": "10.34.0", @@ -25,11 +31,5 @@ "eslint-config-vujita": "0.0.6-alpha.7", "rimraf": "5.0.1", "typescript": "5.1.6" - }, - "eslintConfig": { - "root": true, - "extends": [ - "eslint-config-vujita/base" - ] } } diff --git a/packages/auth/package.json b/packages/auth/package.json index 7aa23bc8..e9363534 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,16 +1,22 @@ { "name": "@vujita/auth", - "private": true, "version": "0.0.3-alpha.0", + "private": true, + "license": "MIT", "main": "./index.ts", "types": "./index.ts", - "license": "MIT", "scripts": { "clean": "rimraf .turbo node_modules", "lint": "eslint .", "lint:fix": "pnpm lint --fix", "type-check": "tsc --noEmit" }, + "eslintConfig": { + "extends": [ + "eslint-config-vujita/base" + ], + "root": true + }, "dependencies": { "@auth/drizzle-adapter": "0.3.13", "@t3-oss/env-nextjs": "0.6.0", @@ -26,11 +32,5 @@ "eslint-config-vujita": "0.0.6-alpha.7", "rimraf": "5.0.1", "typescript": "5.1.6" - }, - "eslintConfig": { - "root": true, - "extends": [ - "eslint-config-vujita/base" - ] } } diff --git a/packages/config/eslint/package.json b/packages/config/eslint/package.json index 24195e03..8380f55d 100644 --- a/packages/config/eslint/package.json +++ b/packages/config/eslint/package.json @@ -1,7 +1,6 @@ { "name": "eslint-config-vujita", "version": "0.0.6-alpha.7", - "license": "MIT", "homepage": "https://github.com/vujita/vubnguyen#readme", "bugs": { "url": "https://github.com/vujita/vubnguyen/issues" @@ -10,9 +9,7 @@ "type": "git", "url": "https://github.com/vujita/vubnguyen" }, - "publishConfig": { - "access": "public" - }, + "license": "MIT", "files": [ "./base.js", "./nextjs.js", @@ -36,5 +33,8 @@ "eslint": "8.45.0", "eslint-plugin-react-refresh": "0.4.3", "typescript": "5.1.6" + }, + "publishConfig": { + "access": "public" } } diff --git a/packages/db/package.json b/packages/db/package.json index e1df3c63..b4456ea1 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,16 +1,16 @@ { "name": "@vujita/db", - "private": true, "version": "0.0.3-alpha.0", + "private": true, + "license": "MIT", "main": "./src/index.ts", "types": "./src/index.ts", - "license": "MIT", "scripts": { "clean": "rm -rf .turbo node_modules", "db:drop": "pnpm with-env drizzle-kit drop", + "db:generate": "pnpm with-env drizzle-kit generate:pg", "db:migrate": "pnpm with-env tsx src/migrate.ts", "db:push": "pnpm with-env drizzle-kit push:pg", - "db:generate": "pnpm with-env drizzle-kit generate:pg", "dev": "pnpm with-env drizzle-kit studio --port 5556", "with-env": "dotenv -e ../../.env --" }, diff --git a/packages/vujita-ui/package.json b/packages/vujita-ui/package.json index a2c1add9..d74f2dbc 100644 --- a/packages/vujita-ui/package.json +++ b/packages/vujita-ui/package.json @@ -1,11 +1,7 @@ { "name": "vujita-ui", "version": "0.0.6-alpha.7", - "license": "MIT", "homepage": "https://github.com/vujita/vubnguyen#readme", - "main": "index.js", - "module": "index.mjs", - "types": "index.d.ts", "bugs": { "url": "https://github.com/vujita/vubnguyen/issues" }, @@ -13,9 +9,10 @@ "type": "git", "url": "https://github.com/vujita/vubnguyen" }, - "publishConfig": { - "access": "public" - }, + "license": "MIT", + "main": "index.js", + "module": "index.mjs", + "types": "index.d.ts", "files": [ "postcss.config.cjs", "tailwind.config.ts", @@ -23,26 +20,52 @@ "*.js" ], "scripts": { - "build:clean": "rimraf ./*.mjs ./*.js ./*.mts ./*.d.ts ./*.map storybook-static", - "build:tsup": "tsup", "build": "xrun -s build:clean build:tsup", + "build-storybook": "storybook build", + "build:clean": "rimraf ./*.mjs ./*.js ./*.mts ./*.d.ts ./*.map storybook-static", "build:storybook": "pnpm storybook build", + "build:tsup": "tsup", + "clean": "rimraf .turbo node_modules", "dev": "xrun dev:tsup", "dev:storybook": "storybook dev -p 6006", "dev:tsup": "tsup --watch", - "clean": "rimraf .turbo node_modules", "lint": "eslint .", "lint:fix": "pnpm lint --fix", "prepare": "xrun build:tsup", - "type-check": "tsc --noEmit", - "test": "jest", - "with-env": "dotenv -e ../../.env --", "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build" + "test": "jest", + "type-check": "tsc --noEmit", + "with-env": "dotenv -e ../../.env --" }, - "peerDependencies": { - "react": "*", - "react-dom": "*" + "eslintConfig": { + "extends": [ + "eslint-config-vujita/base", + "eslint-config-vujita/react", + "plugin:storybook/recommended" + ], + "overrides": [ + { + "files": [ + "*.test.js", + "*.test.jsx", + "*.test.ts", + "*.test.tsx" + ], + "rules": { + "@typescript-eslint/no-unsafe-call": 1 + } + }, + { + "files": [ + "*.stories.ts", + "*.stories.tsx" + ], + "rules": { + "@typescript-eslint/await-thenable": "off" + } + } + ], + "root": true }, "dependencies": { "class-variance-authority": "0.7.0", @@ -83,34 +106,11 @@ "tsup": "7.2.0", "typescript": "5.1.6" }, - "eslintConfig": { - "root": true, - "extends": [ - "eslint-config-vujita/base", - "eslint-config-vujita/react", - "plugin:storybook/recommended" - ], - "overrides": [ - { - "files": [ - "*.test.js", - "*.test.jsx", - "*.test.ts", - "*.test.tsx" - ], - "rules": { - "@typescript-eslint/no-unsafe-call": 1 - } - }, - { - "files": [ - "*.stories.ts", - "*.stories.tsx" - ], - "rules": { - "@typescript-eslint/await-thenable": "off" - } - } - ] + "peerDependencies": { + "react": "*", + "react-dom": "*" + }, + "publishConfig": { + "access": "public" } } diff --git a/packages/vujita-ui/stories/Configure.mdx b/packages/vujita-ui/stories/Configure.mdx index 51570900..d6cc8cce 100644 --- a/packages/vujita-ui/stories/Configure.mdx +++ b/packages/vujita-ui/stories/Configure.mdx @@ -1,35 +1,37 @@ import { Meta } from "@storybook/blocks"; -import Github from "./assets/github.svg"; -import Discord from "./assets/discord.svg"; -import Youtube from "./assets/youtube.svg"; -import Tutorials from "./assets/tutorials.svg"; -import Styling from "./assets/styling.png"; -import Context from "./assets/context.png"; +import Accessibility from "./assets/accessibility.png"; +import AddonLibrary from "./assets/addon-library.png"; import Assets from "./assets/assets.png"; +import Context from "./assets/context.png"; +import Discord from "./assets/discord.svg"; import Docs from "./assets/docs.png"; -import Share from "./assets/share.png"; import FigmaPlugin from "./assets/figma-plugin.png"; +import Github from "./assets/github.svg"; +import Share from "./assets/share.png"; +import Styling from "./assets/styling.png"; import Testing from "./assets/testing.png"; -import Accessibility from "./assets/accessibility.png"; import Theming from "./assets/theming.png"; -import AddonLibrary from "./assets/addon-library.png"; +import Tutorials from "./assets/tutorials.svg"; +import Youtube from "./assets/youtube.svg"; -export const RightArrow = () => ( + - - + > + + +); @@ -38,6 +40,7 @@ export const RightArrow = () =>
@@ -84,6 +87,7 @@ export const RightArrow = () =>
@@ -203,6 +207,7 @@ export const RightArrow = () => Discover tutorials
+