diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..d2ae35e --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint-staged diff --git a/.huskyrc.js b/.huskyrc.js deleted file mode 100644 index 3526631..0000000 --- a/.huskyrc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - hooks: { - // Run lint-staged before committing, config is defined in lintstagedrc. - "pre-commit": "lint-staged", - }, -}; diff --git a/next.config.js b/next.config.js index 4ea76a3..0191314 100644 --- a/next.config.js +++ b/next.config.js @@ -3,16 +3,9 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({ }); module.exports = withBundleAnalyzer({ - webpack(config) { - config.module.rules.push({ - test: /\.svg$/, - issuer: { - test: /\.(js|ts)x?$/, - }, - use: ["@svgr/webpack"], - }); - - return config; + future: { + webpack5: true, + strictPostcssConfiguration: true, }, async rewrites() { return [ diff --git a/package.json b/package.json index 158de1c..e086793 100644 --- a/package.json +++ b/package.json @@ -11,72 +11,73 @@ "lint": "eslint . --ignore-path .gitignore", "seed-database": "node scripts/seedDatabase.js", "start": "next start", - "validate": "yarn check-types && yarn lint" + "validate": "yarn check-types && yarn lint", + "prepare": "husky install && shx rm -rf .git/hooks && shx ln -s ../.husky .git/hooks" }, "dependencies": { - "@headlessui/react": "^0.3.0", - "@nestjs/common": "^7.6.11", + "@headlessui/react": "^0.3.2", + "@heroicons/react": "^1.0.0", + "@nestjs/common": "^7.6.15", "@nestjs/config": "^0.6.3", - "@nestjs/core": "^7.6.11", - "@nestjs/platform-express": "^7.6.11", - "@next/bundle-analyzer": "^10.0.6", - "@react-aria/interactions": "^3.3.2", - "@svgr/webpack": "^5.5.0", - "@tailwindcss/forms": "^0.2.1", + "@nestjs/core": "^7.6.15", + "@nestjs/platform-express": "^7.6.15", + "@next/bundle-analyzer": "^10.1.3", + "@react-aria/interactions": "^3.3.4", + "@tailwindcss/forms": "^0.3.2", "@tailwindcss/typography": "^0.4.0", - "autoprefixer": "^10.2.4", + "autoprefixer": "^10.2.5", "clsx": "^1.1.1", - "date-fns": "^2.17.0", + "date-fns": "^2.20.0", "dotenv": "^8.2.0", - "faker": "^5.3.1", - "firebase": "^8.2.6", - "firebase-admin": "^9.4.2", - "framer-motion": "^3.3.0", - "heroicons": "^0.4.2", + "faker": "^5.5.3", + "firebase": "^8.3.3", + "firebase-admin": "^9.6.0", + "framer-motion": "^4.1.3", "lodash.kebabcase": "^4.1.1", - "next": "^10.0.6", - "postcss": "^8.2.5", - "react": "^17.0.1", - "react-dom": "^17.0.1", - "react-firebase-hooks": "^2.2.0", - "react-hook-form": "^6.15.1", + "next": "^10.1.3", + "postcss": "^8.2.9", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-firebase-hooks": "^3.0.3", + "react-hook-form": "^7.0.4", "react-linkify": "^1.0.0-alpha", "react-syntax-highlighter": "^15.4.3", - "react-virtuoso": "^1.5.4", + "react-virtuoso": "^1.6.0", "reflect-metadata": "^0.1.13", - "rxjs": "^6.6.3", - "tailwindcss": "^2.0.2", - "tinykeys": "^1.1.1" + "rxjs": "^6.6.7", + "tailwindcss": "^2.1.1", + "tinykeys": "^1.1.2" }, "devDependencies": { - "@babel/core": "^7.12.13", - "@babel/plugin-proposal-decorators": "^7.12.13", - "@nestjs/cli": "^7.5.4", - "@nestjs/schematics": "^7.2.7", + "@babel/core": "^7.13.15", + "@babel/plugin-proposal-decorators": "^7.13.15", + "@nestjs/cli": "^7.6.0", + "@nestjs/schematics": "^7.3.1", "@types/express": "^4.17.11", "@types/lodash.kebabcase": "^4.1.6", - "@types/node": "^14.14.25", - "@types/react": "^17.0.1", - "@types/react-dom": "^17.0.0", + "@types/node": "^14.14.37", + "@types/react": "^17.0.3", + "@types/react-dom": "^17.0.3", "@types/react-linkify": "^1.0.0", "@types/react-syntax-highlighter": "^13.5.0", - "@typescript-eslint/eslint-plugin": "^4.14.2", - "@typescript-eslint/parser": "^4.14.2", + "@typescript-eslint/eslint-plugin": "^4.21.0", + "@typescript-eslint/parser": "^4.21.0", "babel-eslint": "^10.1.0", "cross-env": "^7.0.3", - "eslint": "^7.19.0", + "eslint": "^7.23.0", "eslint-config-react-app": "^6.0.0", - "eslint-plugin-flowtype": "^5.2.0", + "eslint-plugin-flowtype": "^5.6.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-react": "^7.22.0", + "eslint-plugin-react": "^7.23.2", "eslint-plugin-react-hooks": "^4.2.0", - "husky": "^4.3.8", + "husky": "^6.0.0", "lint-staged": "^10.5.4", "organize-imports-cli": "^0.8.0", "prettier": "^2.2.1", - "prettier-plugin-packagejson": "^2.2.9", - "type-fest": "^0.20.2", - "typescript": "^4.1.3" + "prettier-plugin-packagejson": "^2.2.10", + "shx": "^0.3.3", + "type-fest": "^1.0.1", + "typescript": "^4.2.4" } } diff --git a/scripts/seedDatabase.js b/scripts/seedDatabase.js index e51864f..ba1b789 100644 --- a/scripts/seedDatabase.js +++ b/scripts/seedDatabase.js @@ -86,7 +86,7 @@ async function seed() { email: faker.internet.email(), name: `${faker.name.firstName()} ${faker.name.lastName()}`, companyWebsite: faker.internet.url(), - companySize: faker.random.number(100), + companySize: faker.datatype.number(100), productsOfInterest: [ maybe() && "Vercel", maybe() && "Preview Deployments", @@ -160,7 +160,7 @@ async function seed() { email: faker.internet.email(), name: `${faker.name.firstName()} ${faker.name.lastName()}`, companyWebsite: faker.internet.url(), - companySize: faker.random.number(100), + companySize: faker.datatype.number(100), productsOfInterest: { "Ich möchte mehr über das Digitalkonzept der Showcases erfahren": maybe(), "Ich würde gerne die Labs besuchen": maybe(), diff --git a/src/components/ColorSelect.tsx b/src/components/ColorSelect.tsx index b54faf5..c652eae 100644 --- a/src/components/ColorSelect.tsx +++ b/src/components/ColorSelect.tsx @@ -1,7 +1,6 @@ import { Listbox, Transition } from "@headlessui/react"; +import { CheckIcon, SelectorIcon } from "@heroicons/react/solid"; import clsx from "clsx"; -import SolidCheckIcon from "heroicons/solid/check.svg"; -import SolidSelectorIcon from "heroicons/solid/selector.svg"; import React, { ReactElement } from "react"; import { FormColor } from "src/types/form"; @@ -34,10 +33,7 @@ export default function ColorSelect({ open, color }: Props): ReactElement { - -