From 32895a1a3c025ab57daa09dd3f5adce07b59a393 Mon Sep 17 00:00:00 2001 From: Mikhail Shkaralevich Date: Tue, 28 May 2024 09:16:20 -1000 Subject: [PATCH 1/2] Setup Prettier --- package-lock.json | 6 +++ ui/.eslintrc.json | 3 +- ui/.prettierrc | 7 +++ ui/package.json | 122 +++++++++++++++++++++++----------------------- 4 files changed, 76 insertions(+), 62 deletions(-) create mode 100644 package-lock.json create mode 100644 ui/.prettierrc diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..5ab54d6d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "uh-groupings", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/ui/.eslintrc.json b/ui/.eslintrc.json index a0f304c1..2ee94ec0 100644 --- a/ui/.eslintrc.json +++ b/ui/.eslintrc.json @@ -7,7 +7,8 @@ "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended", - "next/core-web-vitals" + "next/core-web-vitals", + "prettier" ], "overrides": [ { diff --git a/ui/.prettierrc b/ui/.prettierrc new file mode 100644 index 00000000..8f394705 --- /dev/null +++ b/ui/.prettierrc @@ -0,0 +1,7 @@ + { + "trailingComma": "none", + "tabWidth": 4, + "semi": true, + "singleQuote": true +} + diff --git a/ui/package.json b/ui/package.json index 1be129a2..be51481d 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,63 +1,63 @@ { - "name": "uh-groupings", - "version": "3.0", - "private": true, - "scripts": { - "predev": "node api-handshake.js", - "dev": "next dev -p 8080", - "build": "next build", - "start": "next start", - "lint": "next lint", - "test": "jest", - "test:coverage": "jest --coverage", - "test:watch": "jest --watch" - }, - "dependencies": { - "@radix-ui/react-alert-dialog": "^1.0.5", - "@radix-ui/react-dialog": "^1.0.5", - "@radix-ui/react-slot": "^1.0.2", - "@radix-ui/react-tabs": "^1.0.4", - "camaro": "^6.2.2", - "class-variance-authority": "^0.7.0", - "clsx": "^2.1.0", - "dotenv": "^16.4.1", - "iron-session": "^8.0.1", - "lucide-react": "^0.321.0", - "next": "14.1.0", - "react": "^18", - "react-dom": "^18", - "react-idle-timer": "^5.7.2", - "tailwind-merge": "^2.2.1", - "tailwindcss-animate": "^1.0.7", - "uniqid": "^5.4.0" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "^1.6.1", - "@swc/core": "^1.3.106", - "@testing-library/dom": "^10.1.0", - "@testing-library/jest-dom": "^6.3.0", - "@testing-library/react": "^14.1.2", - "@testing-library/user-event": "^14.5.2", - "@types/jest": "^29.5.11", - "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", - "@types/uniqid": "^5.3.4", - "@typescript-eslint/eslint-plugin": "^6.19.1", - "@typescript-eslint/parser": "^6.19.1", - "autoprefixer": "^10.0.1", - "eslint": "^8", - "eslint-config-next": "14.1.0", - "eslint-plugin-testing-library": "^6.2.0", - "eslint-plugin-tsdoc": "^0.2.17", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", - "jest-fetch-mock": "^3.0.3", - "postcss": "^8.4.33", - "postcss-preset-mantine": "^1.12.3", - "postcss-simple-vars": "^7.0.1", - "tailwindcss": "^3.3.0", - "ts-node": "^10.9.2", - "typescript": "^5.3.3" - } + "name": "uh-groupings", + "version": "3.0", + "private": true, + "scripts": { + "predev": "node api-handshake.js", + "dev": "next dev -p 8080", + "build": "next build", + "start": "next start", + "lint": "next lint", + "test": "jest", + "test:coverage": "jest --coverage", + "test:watch": "jest --watch" + }, + "dependencies": { + "@radix-ui/react-alert-dialog": "^1.0.5", + "@radix-ui/react-dialog": "^1.0.5", + "@radix-ui/react-slot": "^1.0.2", + "@radix-ui/react-tabs": "^1.0.4", + "camaro": "^6.2.2", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.0", + "dotenv": "^16.4.1", + "iron-session": "^8.0.1", + "lucide-react": "^0.321.0", + "next": "14.1.0", + "react": "^18", + "react-dom": "^18", + "react-idle-timer": "^5.7.2", + "tailwind-merge": "^2.2.1", + "tailwindcss-animate": "^1.0.7", + "uniqid": "^5.4.0" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "^1.6.1", + "@swc/core": "^1.3.106", + "@testing-library/jest-dom": "^6.3.0", + "@testing-library/react": "^14.1.2", + "@types/jest": "^29.5.11", + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "@types/uniqid": "^5.3.4", + "@typescript-eslint/eslint-plugin": "^6.19.1", + "@typescript-eslint/parser": "^6.19.1", + "autoprefixer": "^10.0.1", + "eslint": "^8", + "eslint-config-next": "14.1.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-testing-library": "^6.2.0", + "eslint-plugin-tsdoc": "^0.2.17", + "jest": "^29.7.0", + "jest-environment-jsdom": "^29.7.0", + "jest-fetch-mock": "^3.0.3", + "postcss": "^8.4.33", + "postcss-preset-mantine": "^1.12.3", + "postcss-simple-vars": "^7.0.1", + "prettier": "3.2.5", + "tailwindcss": "^3.3.0", + "ts-node": "^10.9.2", + "typescript": "^5.3.3" + } } From bb0dc6c1e78afe83e029bdee76c2653c66f010b0 Mon Sep 17 00:00:00 2001 From: Mikhail Shkaralevich Date: Fri, 31 May 2024 10:00:47 -1000 Subject: [PATCH 2/2] Add 'testing-library/user-event' dependency --- ui/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/package.json b/ui/package.json index be51481d..dced7b69 100644 --- a/ui/package.json +++ b/ui/package.json @@ -36,6 +36,7 @@ "@swc/core": "^1.3.106", "@testing-library/jest-dom": "^6.3.0", "@testing-library/react": "^14.1.2", + "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.11", "@types/node": "^20", "@types/react": "^18",