From c7001e62f34b7e0592a7d143f51e9266e03ddc57 Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Mon, 28 Aug 2023 00:51:35 +0530 Subject: [PATCH 01/48] fix: removed unnecessary whitespace Signed-off-by: Adithya Krishna --- packages/ui/primitives/card.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/primitives/card.tsx b/packages/ui/primitives/card.tsx index 5144c4dfa..90619d2bf 100644 --- a/packages/ui/primitives/card.tsx +++ b/packages/ui/primitives/card.tsx @@ -110,7 +110,7 @@ CardContent.displayName = 'CardContent'; const CardFooter = React.forwardRef>( ({ className, ...props }, ref) => ( -
+
), ); From c817c67a1c6df2f56e91ad6aac0c289411178509 Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Mon, 28 Aug 2023 00:56:15 +0530 Subject: [PATCH 02/48] fix: removed more unnecessary whitespace Signed-off-by: Adithya Krishna --- apps/web/src/components/(dashboard)/layout/desktop-nav.tsx | 2 +- packages/ui/primitives/navigation-menu.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx b/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx index 9b64baf58..f07d2baf4 100644 --- a/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx +++ b/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx @@ -13,7 +13,7 @@ export const DesktopNav = ({ className, ...props }: DesktopNavProps) => { {/* Date: Mon, 28 Aug 2023 08:14:21 +0530 Subject: [PATCH 03/48] fix: duplicate import Signed-off-by: Adithya Krishna --- apps/web/src/pages/api/document/create.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/web/src/pages/api/document/create.ts b/apps/web/src/pages/api/document/create.ts index d6a3b4524..b2042315f 100644 --- a/apps/web/src/pages/api/document/create.ts +++ b/apps/web/src/pages/api/document/create.ts @@ -1,7 +1,6 @@ import { NextApiRequest, NextApiResponse } from 'next'; -import formidable from 'formidable'; -import { type File } from 'formidable'; +import formidable, { type File } from 'formidable'; import { readFileSync } from 'fs'; import { getServerSession } from '@documenso/lib/next-auth/get-server-session'; From 090752c539f3f803e12d4622afb9a7881d168daa Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Mon, 28 Aug 2023 08:14:42 +0530 Subject: [PATCH 04/48] feat: added new eslint rules Signed-off-by: Adithya Krishna --- .eslintrc.cjs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 8113ada52..3d19691e5 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,9 +1,28 @@ /** @type {import('eslint').Linter.Config} */ module.exports = { root: true, - extends: ['@documenso/eslint-config'], + extends: [ + '@documenso/eslint-config', + 'plugin:package-json/recommended', + 'plugin:import/recommended', + ], + plugins: ['package-json', 'import', 'simple-import-sort'], rules: { '@next/next/no-img-element': 'off', + 'no-multi-spaces': [ + 'error', + { + ignoreEOLComments: false, + exceptions: { + BinaryExpression: false, + VariableDeclarator: false, + ImportDeclaration: false, + Property: false, + }, + }, + ], + 'import/named': 'off', + 'no-duplicate-imports': 'error', }, settings: { next: { From 829122c486baed19b7d8ff37457365efa94aefeb Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Mon, 28 Aug 2023 08:15:12 +0530 Subject: [PATCH 05/48] feat: added eslint plugin dependencies Signed-off-by: Adithya Krishna --- package-lock.json | 133 +++++++++++++++++++++++----- packages/eslint-config/package.json | 7 +- 2 files changed, 115 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8f3b7d79f..8be47592a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6807,6 +6807,31 @@ "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" }, + "node_modules/disparity": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/disparity/-/disparity-3.2.0.tgz", + "integrity": "sha512-8cl9ouncFYE7OQsYwJNiy2e15S0xN80X1Jj/N/YkoiM+VGWSyg1YzPToecKyYx2DQiJapt5IC8yi43GW23TUHQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.2.1", + "diff": "^4.0.2" + }, + "bin": { + "disparity": "bin/disparity" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/disparity/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", @@ -7591,9 +7616,9 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.0.tgz", - "integrity": "sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==", + "version": "2.28.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", + "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", "dependencies": { "array-includes": "^3.1.6", "array.prototype.findlastindex": "^1.2.2", @@ -7604,13 +7629,12 @@ "eslint-import-resolver-node": "^0.3.7", "eslint-module-utils": "^2.8.0", "has": "^1.0.3", - "is-core-module": "^2.12.1", + "is-core-module": "^2.13.0", "is-glob": "^4.0.3", "minimatch": "^3.1.2", "object.fromentries": "^2.0.6", "object.groupby": "^1.0.0", "object.values": "^1.1.6", - "resolve": "^1.22.3", "semver": "^6.3.1", "tsconfig-paths": "^3.14.2" }, @@ -7640,22 +7664,6 @@ "node": ">=0.10.0" } }, - "node_modules/eslint-plugin-import/node_modules/resolve": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz", - "integrity": "sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==", - "dependencies": { - "is-core-module": "^2.12.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/eslint-plugin-import/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -7701,6 +7709,23 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-package-json": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-package-json/-/eslint-plugin-package-json-0.1.4.tgz", + "integrity": "sha512-qdb9LUBFR3tM9OZM1AaYCkxoZnRx7PX2xqvLm49D0JbUu+EkbDur9ug+tCS2xlA1Lbt12Wff5qES81ttc/VBdg==", + "dev": true, + "dependencies": { + "disparity": "^3.0.0", + "package-json-validator": "^0.6.3", + "requireindex": "^1.2.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "eslint": ">=4.7.0" + } + }, "node_modules/eslint-plugin-prettier": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", @@ -7795,6 +7820,15 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-simple-import-sort": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", + "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", + "dev": true, + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, "node_modules/eslint-plugin-turbo": { "version": "1.10.12", "resolved": "https://registry.npmjs.org/eslint-plugin-turbo/-/eslint-plugin-turbo-1.10.12.tgz", @@ -9345,9 +9379,9 @@ } }, "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dependencies": { "has": "^1.0.3" }, @@ -12115,6 +12149,22 @@ "url": "https://github.com/sponsors/panva" } }, + "node_modules/optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha512-snN4O4TkigujZphWLN0E//nQmm7790RYaE53DdL7ZYwee2D8DDo9/EyYiKUfN3rneWUjhJnueija3G9I2i0h3g==", + "dev": true, + "dependencies": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "node_modules/optimist/node_modules/minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha512-iotkTvxc+TwOm5Ieim8VnSNvCDjCK9S8G3scJ50ZthspSxa7jx50jkhYduuAtAjvfDUwSgOwf8+If99AlOEhyw==", + "dev": true + }, "node_modules/optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -12168,6 +12218,18 @@ "node": ">=6" } }, + "node_modules/package-json-validator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/package-json-validator/-/package-json-validator-0.6.3.tgz", + "integrity": "sha512-juKiFboV4UKUvWQ+OSxstnyukhuluyuEoFmgZw1Rx21XzmwlgDWLcbl3qzjA3789IRORYhVFs7cmAO0YFGwHCg==", + "dev": true, + "dependencies": { + "optimist": "~0.6.0" + }, + "bin": { + "pjv": "bin/pjv" + } + }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -13715,6 +13777,15 @@ "node": ">=0.10.0" } }, + "node_modules/requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true, + "engines": { + "node": ">=0.10.5" + } + }, "node_modules/resolve": { "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", @@ -16203,6 +16274,15 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "node_modules/wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -16345,6 +16425,11 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.32.2", "typescript": "^5.1.6" + }, + "devDependencies": { + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-package-json": "^0.1.4", + "eslint-plugin-simple-import-sort": "^10.0.0" } }, "packages/eslint-config/node_modules/@eslint/eslintrc": { diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index a34230ee1..319af96e0 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -9,9 +9,14 @@ "eslint": "^8.40.0", "eslint-config-next": "13.4.12", "eslint-config-prettier": "^8.8.0", + "eslint-config-turbo": "^1.9.3", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.32.2", - "eslint-config-turbo": "^1.9.3", "typescript": "^5.1.6" + }, + "devDependencies": { + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-package-json": "^0.1.4", + "eslint-plugin-simple-import-sort": "^10.0.0" } } From aad52a3e2e3fb96b315e4898b9c2821383d7e98a Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Mon, 28 Aug 2023 08:37:59 +0530 Subject: [PATCH 06/48] fix: updated eslint config Signed-off-by: Adithya Krishna --- .eslintrc.cjs | 21 +-------------------- packages/eslint-config/index.cjs | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3d19691e5..8113ada52 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,28 +1,9 @@ /** @type {import('eslint').Linter.Config} */ module.exports = { root: true, - extends: [ - '@documenso/eslint-config', - 'plugin:package-json/recommended', - 'plugin:import/recommended', - ], - plugins: ['package-json', 'import', 'simple-import-sort'], + extends: ['@documenso/eslint-config'], rules: { '@next/next/no-img-element': 'off', - 'no-multi-spaces': [ - 'error', - { - ignoreEOLComments: false, - exceptions: { - BinaryExpression: false, - VariableDeclarator: false, - ImportDeclaration: false, - Property: false, - }, - }, - ], - 'import/named': 'off', - 'no-duplicate-imports': 'error', }, settings: { next: { diff --git a/packages/eslint-config/index.cjs b/packages/eslint-config/index.cjs index 9386fc7cb..60c58f89f 100644 --- a/packages/eslint-config/index.cjs +++ b/packages/eslint-config/index.cjs @@ -6,9 +6,11 @@ module.exports = { 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', + 'plugin:package-json/recommended', + 'plugin:import/recommended', ], - plugins: ['prettier'], + plugins: ['prettier', 'package-json', 'import', 'simple-import-sort'], env: { node: true, @@ -38,5 +40,21 @@ module.exports = { // To handle this we want this rule to catch usages and highlight them as // warnings so we can write appropriate interfaces and guards later. '@typescript-eslint/consistent-type-assertions': ['warn', { assertionStyle: 'never' }], + 'no-multi-spaces': [ + 'error', + { + ignoreEOLComments: false, + exceptions: { + BinaryExpression: false, + VariableDeclarator: false, + ImportDeclaration: false, + Property: false, + }, + }, + ], + 'import/named': 'error', + 'import/no-named-as-default': 'off', + 'import/namespace': 'off', + 'no-duplicate-imports': 'error', }, }; From e8336ae9b40952b003d065a2d47a7896e2fd769b Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Mon, 28 Aug 2023 12:32:20 +0530 Subject: [PATCH 07/48] chore: removed eslint-plugin-import Signed-off-by: Adithya Krishna --- package-lock.json | 497 +++++++++++++++------------- packages/eslint-config/index.cjs | 6 +- packages/eslint-config/package.json | 1 - 3 files changed, 259 insertions(+), 245 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8be47592a..d8b1c5263 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "packages/*" ], "dependencies": { + "@prisma/client": "^5.0.0", "recharts": "^2.7.2" }, "devDependencies": { @@ -17,7 +18,7 @@ "@commitlint/config-conventional": "^17.7.0", "dotenv": "^16.0.3", "dotenv-cli": "^7.2.1", - "eslint": "^7.32.0", + "eslint": "^8.48.0", "eslint-config-custom": "*", "husky": "^8.0.0", "lint-staged": "^14.0.0", @@ -1553,36 +1554,47 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "engines": { - "node": ">= 4" + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/@eslint/js": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", - "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz", + "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -1665,13 +1677,13 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" @@ -7207,56 +7219,53 @@ } }, "node_modules/eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz", + "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==", "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "8.48.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -7901,41 +7910,84 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, "engines": { - "node": ">=10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "engines": { - "node": ">= 4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/espree/node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">=4" + "node": ">=0.4.0" } }, "node_modules/esprima": { @@ -16089,9 +16141,9 @@ } }, "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", + "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==" }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", @@ -16427,168 +16479,10 @@ "typescript": "^5.1.6" }, "devDependencies": { - "eslint-plugin-import": "^2.28.1", "eslint-plugin-package-json": "^0.1.4", "eslint-plugin-simple-import-sort": "^10.0.0" } }, - "packages/eslint-config/node_modules/@eslint/eslintrc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz", - "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/eslint-config/node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "packages/eslint-config/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "packages/eslint-config/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "packages/eslint-config/node_modules/eslint": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz", - "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.1", - "@eslint/js": "^8.46.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.2", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/eslint-config/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/eslint-config/node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/eslint-config/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "packages/eslint-config/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "packages/lib": { "name": "@documenso/lib", "version": "1.0.0", @@ -16655,6 +16549,131 @@ "@tailwindcss/typography": "^0.5.9" } }, + "packages/tailwind-config/node_modules/@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "packages/tailwind-config/node_modules/@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "packages/tailwind-config/node_modules/eslint": { + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "packages/tailwind-config/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "engines": { + "node": ">=10" + } + }, + "packages/tailwind-config/node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "packages/tailwind-config/node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, + "packages/tailwind-config/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, "packages/trpc": { "name": "@documenso/trpc", "version": "1.0.0", diff --git a/packages/eslint-config/index.cjs b/packages/eslint-config/index.cjs index 60c58f89f..eb2054c73 100644 --- a/packages/eslint-config/index.cjs +++ b/packages/eslint-config/index.cjs @@ -7,10 +7,9 @@ module.exports = { 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'plugin:package-json/recommended', - 'plugin:import/recommended', ], - plugins: ['prettier', 'package-json', 'import', 'simple-import-sort'], + plugins: ['prettier', 'package-json', 'simple-import-sort'], env: { node: true, @@ -52,9 +51,6 @@ module.exports = { }, }, ], - 'import/named': 'error', - 'import/no-named-as-default': 'off', - 'import/namespace': 'off', 'no-duplicate-imports': 'error', }, }; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 319af96e0..a14ea56e2 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -15,7 +15,6 @@ "typescript": "^5.1.6" }, "devDependencies": { - "eslint-plugin-import": "^2.28.1", "eslint-plugin-package-json": "^0.1.4", "eslint-plugin-simple-import-sort": "^10.0.0" } From 2418612507bb8171f4d452ba18542dc13a938621 Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Sat, 26 Aug 2023 13:18:12 +0530 Subject: [PATCH 08/48] chore: updated documents page Signed-off-by: Adithya Krishna --- .../src/app/(dashboard)/documents/page.tsx | 44 +++++++------------ 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/apps/web/src/app/(dashboard)/documents/page.tsx b/apps/web/src/app/(dashboard)/documents/page.tsx index 834483757..8ac33be51 100644 --- a/apps/web/src/app/(dashboard)/documents/page.tsx +++ b/apps/web/src/app/(dashboard)/documents/page.tsx @@ -64,6 +64,12 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage return `/documents?${params.toString()}`; }; + const documentStatuses = [ + InternalDocumentStatus.PENDING, + InternalDocumentStatus.COMPLETED, + InternalDocumentStatus.DRAFT, + ]; + return (
@@ -73,35 +79,17 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage
- - - + {documentStatuses.map((status) => ( + + + - - {Math.min(stats.PENDING, 99)} - - - - - - - - - - {Math.min(stats.COMPLETED, 99)} - - - - - - - - - - {Math.min(stats.DRAFT, 99)} - - - + + {Math.min(stats[status], 99)} + + + + ))} All From 3ac29d8da3da4bb307d7185463e8101d1d2f9654 Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Sat, 26 Aug 2023 13:18:28 +0530 Subject: [PATCH 09/48] chore: updated dashboard page Signed-off-by: Adithya Krishna --- .../src/app/(dashboard)/dashboard/page.tsx | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/web/src/app/(dashboard)/dashboard/page.tsx b/apps/web/src/app/(dashboard)/dashboard/page.tsx index a9d650eb6..6af737a68 100644 --- a/apps/web/src/app/(dashboard)/dashboard/page.tsx +++ b/apps/web/src/app/(dashboard)/dashboard/page.tsx @@ -34,22 +34,23 @@ export default async function DashboardPage() { }), ]); + const cardData = [ + { icon: FileCheck, title: 'Completed', status: stats.COMPLETED }, + { icon: File, title: 'Drafts', status: stats.DRAFT }, + { icon: Clock, title: 'Pending', status: stats.PENDING }, + ]; + return (

Dashboard

-
- - - - - - - - - + {cardData.map((card) => ( + + + + ))}
- + ;
From d195dc1a46e1b053e488ba4f52072ac927e9e7cf Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Sat, 26 Aug 2023 13:18:58 +0530 Subject: [PATCH 10/48] chore: updated signing fields Signed-off-by: Adithya Krishna --- .../app/(signing)/sign/[token]/date-field.tsx | 18 +++++++++------ .../sign/[token]/signature-field.tsx | 4 ++-- .../sign/[token]/signing-field-container.tsx | 23 ++++++++----------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/apps/web/src/app/(signing)/sign/[token]/date-field.tsx b/apps/web/src/app/(signing)/sign/[token]/date-field.tsx index 8e2201df9..599aa8358 100644 --- a/apps/web/src/app/(signing)/sign/[token]/date-field.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/date-field.tsx @@ -82,13 +82,17 @@ export const DateField = ({ field, recipient }: DateFieldProps) => {
)} - {!field.inserted && ( -

Date

- )} - - {field.inserted && ( -

{field.customText}

- )} +

+ {field.inserted ? field.customText : 'Date'} +

); }; diff --git a/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx b/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx index bbc58b5e8..921b4f51f 100644 --- a/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx @@ -139,9 +139,9 @@ export const SignatureField = ({ field, recipient }: SignatureFieldProps) => { /> )} - {state === 'signed-text' && ( + {state === 'signed-text' && signature?.typedSignature && (

- {signature?.typedSignature} + {signature.typedSignature}

)} diff --git a/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx b/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx index d5efcb3df..329b9938b 100644 --- a/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx @@ -60,19 +60,16 @@ export const SigningFieldContainer = ({ 'text-foreground hover:shadow-primary-foreground group flex h-full w-full flex-col items-center justify-center p-2', )} > - {!field.inserted && !loading && ( - - )} - + {children} From b8b8b4dbadc26d157f936a7640f9845be9c9c675 Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Sat, 26 Aug 2023 13:19:47 +0530 Subject: [PATCH 11/48] chore: updated footer component Signed-off-by: Adithya Krishna --- .../web/src/components/(marketing)/footer.tsx | 79 +++++++------------ 1 file changed, 28 insertions(+), 51 deletions(-) diff --git a/apps/web/src/components/(marketing)/footer.tsx b/apps/web/src/components/(marketing)/footer.tsx index 823ece92e..df47b05da 100644 --- a/apps/web/src/components/(marketing)/footer.tsx +++ b/apps/web/src/components/(marketing)/footer.tsx @@ -10,6 +10,19 @@ import { cn } from '@documenso/ui/lib/utils'; export type FooterProps = HTMLAttributes; export const Footer = ({ className, ...props }: FooterProps) => { + const socialLinks = [ + { href: 'https://twitter.com/documenso', icon: }, + { href: 'https://github.com/documenso/documenso', icon: }, + { href: 'https://documenso.slack.com', icon: }, + ]; + + const footerLinks = [ + { href: '/pricing', text: 'Pricing' }, + { href: 'https://status.documenso.com', text: 'Status', target: '_blank' }, + { href: 'mailto:support@documenso.com', text: 'Support' }, + // { href: '/privacy', text: 'Privacy'} + ]; + return (
@@ -19,61 +32,25 @@ export const Footer = ({ className, ...props }: FooterProps) => {
- - - - - - - - - - - + {socialLinks.map((link, index) => ( + + {link.icon} + + ))}
- - Pricing - - - - Status - - - - Support - - - {/* - Privacy - */} + {footerLinks.map((link, index) => ( + + {link.text} + + ))}
From f41c78e8e353697b8f53582bed0498ae743cfa3f Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Sun, 27 Aug 2023 07:24:39 +0530 Subject: [PATCH 12/48] feat: updated rendeing of items using map Signed-off-by: Adithya Krishna --- .../faster-smarter-beautiful-bento.tsx | 54 ++++++------- .../(marketing)/open-build-template-bento.tsx | 55 +++++++------- .../share-connect-paid-widget-bento.tsx | 76 +++++++++---------- 3 files changed, 93 insertions(+), 92 deletions(-) diff --git a/apps/web/src/components/(marketing)/faster-smarter-beautiful-bento.tsx b/apps/web/src/components/(marketing)/faster-smarter-beautiful-bento.tsx index 2cbaaef53..8b7eaf15c 100644 --- a/apps/web/src/components/(marketing)/faster-smarter-beautiful-bento.tsx +++ b/apps/web/src/components/(marketing)/faster-smarter-beautiful-bento.tsx @@ -16,6 +16,21 @@ export const FasterSmarterBeautifulBento = ({ className, ...props }: FasterSmarterBeautifulBentoProps) => { + const featureCards = [ + { + title: 'Beautiful.', + description: + 'Because signing should be celebrated. That’s why we care about the smallest detail in our product.', + image: cardBeautifulFigure, + }, + { + title: 'Smart.', + description: + 'Our custom templates come with smart rules that can help you save time and energy.', + image: cardSmartFigure, + }, + ]; + return (
@@ -45,32 +60,19 @@ export const FasterSmarterBeautifulBento = ({ - - -

- Beautiful. - Because signing should be celebrated. That’s why we care about the smallest detail in - our product. -

- -
- its fast -
-
-
- - - -

- Smart. - Our custom templates come with smart rules that can help you save time and energy. -

- -
- its fast -
-
-
+ {featureCards.map((card, index) => ( + + +

+ {card.title} + {card.description} +

+
+ Its fast +
+
+
+ ))}
); diff --git a/apps/web/src/components/(marketing)/open-build-template-bento.tsx b/apps/web/src/components/(marketing)/open-build-template-bento.tsx index e7920500b..779ef36e5 100644 --- a/apps/web/src/components/(marketing)/open-build-template-bento.tsx +++ b/apps/web/src/components/(marketing)/open-build-template-bento.tsx @@ -13,6 +13,22 @@ import cardTemplateFigure from '~/assets/card-template-figure.png'; export type OpenBuildTemplateBentoProps = HTMLAttributes; export const OpenBuildTemplateBento = ({ className, ...props }: OpenBuildTemplateBentoProps) => { + const cardData = [ + { + title: 'Build on top.', + description: 'Make it your own through advanced customization and adjustability.', + image: cardBuildFigure, + imageSize: 'max-w-xs', + }, + { + title: 'Template Store (Soon).', + description: + 'Choose a template from the community app store. Or submit your own template for others to use.', + image: cardTemplateFigure, + imageSize: 'max-w-sm', + }, + ]; + return (
@@ -42,32 +58,19 @@ export const OpenBuildTemplateBento = ({ className, ...props }: OpenBuildTemplat - - -

- Build on top. - Make it your own through advanced customization and adjustability. -

- -
- its fast -
-
-
- - - -

- Template Store (Soon). - Choose a template from the community app store. Or submit your own template for others - to use. -

- -
- its fast -
-
-
+ {cardData.map((card, index) => ( + + +

+ {card.title} + {card.description} +

+
+ Its fast +
+
+
+ ))}
); diff --git a/apps/web/src/components/(marketing)/share-connect-paid-widget-bento.tsx b/apps/web/src/components/(marketing)/share-connect-paid-widget-bento.tsx index 05b6a3232..8c7fa74e5 100644 --- a/apps/web/src/components/(marketing)/share-connect-paid-widget-bento.tsx +++ b/apps/web/src/components/(marketing)/share-connect-paid-widget-bento.tsx @@ -17,6 +17,29 @@ export const ShareConnectPaidWidgetBento = ({ className, ...props }: ShareConnectPaidWidgetBentoProps) => { + const cardData = [ + { + title: 'Connections (Soon).', + description: + 'Create connections and automations with Zapier and more to integrate with your favorite tools.', + image: cardConnectionsFigure, + imageSize: 'max-w-sm', + }, + { + title: 'Get paid (Soon).', + description: 'Integrated payments with stripe so you don’t have to worry about getting paid.', + image: cardPaidFigure, + imageSize: 'max-w-[14rem]', + }, + { + title: 'React Widget (Soon).', + description: + 'Easily embed Documenso into your product. Simply copy and paste our react widget into your application.', + image: cardWidgetFigure, + imageSize: 'max-w-xs', + }, + ]; + return (
@@ -45,46 +68,19 @@ export const ShareConnectPaidWidgetBento = ({ - - -

- Connections (Soon). - Create connections and automations with Zapier and more to integrate with your - favorite tools. -

- -
- its fast -
-
-
- - - -

- Get paid (Soon). - Integrated payments with stripe so you don’t have to worry about getting paid. -

- -
- its fast -
-
-
- - - -

- React Widget (Soon). - Easily embed Documenso into your product. Simply copy and paste our react widget into - your application. -

- -
- its fast -
-
-
+ {cardData.map((card, index) => ( + + +

+ {card.title} + {card.description} +

+
+ Its fast +
+
+
+ ))}
); From 3c1790ba83d5ff8b24bbf50cabadf5f9532b335a Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Mon, 28 Aug 2023 12:44:50 +0530 Subject: [PATCH 13/48] chore: made requested changes Signed-off-by: Adithya Krishna --- .../src/app/(dashboard)/dashboard/page.tsx | 23 +++--- .../app/(signing)/sign/[token]/date-field.tsx | 18 ++--- .../sign/[token]/signing-field-container.tsx | 22 +++--- .../faster-smarter-beautiful-bento.tsx | 54 +++++++------ .../web/src/components/(marketing)/footer.tsx | 14 ++-- .../(marketing)/open-build-template-bento.tsx | 55 +++++++------- .../share-connect-paid-widget-bento.tsx | 76 ++++++++++--------- 7 files changed, 129 insertions(+), 133 deletions(-) diff --git a/apps/web/src/app/(dashboard)/dashboard/page.tsx b/apps/web/src/app/(dashboard)/dashboard/page.tsx index 6af737a68..a9d650eb6 100644 --- a/apps/web/src/app/(dashboard)/dashboard/page.tsx +++ b/apps/web/src/app/(dashboard)/dashboard/page.tsx @@ -34,23 +34,22 @@ export default async function DashboardPage() { }), ]); - const cardData = [ - { icon: FileCheck, title: 'Completed', status: stats.COMPLETED }, - { icon: File, title: 'Drafts', status: stats.DRAFT }, - { icon: Clock, title: 'Pending', status: stats.PENDING }, - ]; - return (

Dashboard

+
- {cardData.map((card) => ( - - - - ))} + + + + + + + + +
- ; +
diff --git a/apps/web/src/app/(signing)/sign/[token]/date-field.tsx b/apps/web/src/app/(signing)/sign/[token]/date-field.tsx index 599aa8358..8e2201df9 100644 --- a/apps/web/src/app/(signing)/sign/[token]/date-field.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/date-field.tsx @@ -82,17 +82,13 @@ export const DateField = ({ field, recipient }: DateFieldProps) => {
)} -

- {field.inserted ? field.customText : 'Date'} -

+ {!field.inserted && ( +

Date

+ )} + + {field.inserted && ( +

{field.customText}

+ )} ); }; diff --git a/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx b/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx index 329b9938b..cdf6dee24 100644 --- a/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx @@ -60,16 +60,18 @@ export const SigningFieldContainer = ({ 'text-foreground hover:shadow-primary-foreground group flex h-full w-full flex-col items-center justify-center p-2', )} > - + {!field.inserted && !loading && ( + + )} {children} diff --git a/apps/web/src/components/(marketing)/faster-smarter-beautiful-bento.tsx b/apps/web/src/components/(marketing)/faster-smarter-beautiful-bento.tsx index 8b7eaf15c..2cbaaef53 100644 --- a/apps/web/src/components/(marketing)/faster-smarter-beautiful-bento.tsx +++ b/apps/web/src/components/(marketing)/faster-smarter-beautiful-bento.tsx @@ -16,21 +16,6 @@ export const FasterSmarterBeautifulBento = ({ className, ...props }: FasterSmarterBeautifulBentoProps) => { - const featureCards = [ - { - title: 'Beautiful.', - description: - 'Because signing should be celebrated. That’s why we care about the smallest detail in our product.', - image: cardBeautifulFigure, - }, - { - title: 'Smart.', - description: - 'Our custom templates come with smart rules that can help you save time and energy.', - image: cardSmartFigure, - }, - ]; - return (
@@ -60,19 +45,32 @@ export const FasterSmarterBeautifulBento = ({ - {featureCards.map((card, index) => ( - - -

- {card.title} - {card.description} -

-
- Its fast -
-
-
- ))} + + +

+ Beautiful. + Because signing should be celebrated. That’s why we care about the smallest detail in + our product. +

+ +
+ its fast +
+
+
+ + + +

+ Smart. + Our custom templates come with smart rules that can help you save time and energy. +

+ +
+ its fast +
+
+
); diff --git a/apps/web/src/components/(marketing)/footer.tsx b/apps/web/src/components/(marketing)/footer.tsx index df47b05da..255d91985 100644 --- a/apps/web/src/components/(marketing)/footer.tsx +++ b/apps/web/src/components/(marketing)/footer.tsx @@ -9,13 +9,13 @@ import { cn } from '@documenso/ui/lib/utils'; export type FooterProps = HTMLAttributes; -export const Footer = ({ className, ...props }: FooterProps) => { - const socialLinks = [ - { href: 'https://twitter.com/documenso', icon: }, - { href: 'https://github.com/documenso/documenso', icon: }, - { href: 'https://documenso.slack.com', icon: }, - ]; +const SOCIAL_LINKS = [ + { href: 'https://twitter.com/documenso', icon: }, + { href: 'https://github.com/documenso/documenso', icon: }, + { href: 'https://documenso.slack.com', icon: }, +]; +export const Footer = ({ className, ...props }: FooterProps) => { const footerLinks = [ { href: '/pricing', text: 'Pricing' }, { href: 'https://status.documenso.com', text: 'Status', target: '_blank' }, @@ -32,7 +32,7 @@ export const Footer = ({ className, ...props }: FooterProps) => {
- {socialLinks.map((link, index) => ( + {SOCIAL_LINKS.map((link, index) => ( {link.icon} diff --git a/apps/web/src/components/(marketing)/open-build-template-bento.tsx b/apps/web/src/components/(marketing)/open-build-template-bento.tsx index 779ef36e5..e7920500b 100644 --- a/apps/web/src/components/(marketing)/open-build-template-bento.tsx +++ b/apps/web/src/components/(marketing)/open-build-template-bento.tsx @@ -13,22 +13,6 @@ import cardTemplateFigure from '~/assets/card-template-figure.png'; export type OpenBuildTemplateBentoProps = HTMLAttributes; export const OpenBuildTemplateBento = ({ className, ...props }: OpenBuildTemplateBentoProps) => { - const cardData = [ - { - title: 'Build on top.', - description: 'Make it your own through advanced customization and adjustability.', - image: cardBuildFigure, - imageSize: 'max-w-xs', - }, - { - title: 'Template Store (Soon).', - description: - 'Choose a template from the community app store. Or submit your own template for others to use.', - image: cardTemplateFigure, - imageSize: 'max-w-sm', - }, - ]; - return (
@@ -58,19 +42,32 @@ export const OpenBuildTemplateBento = ({ className, ...props }: OpenBuildTemplat - {cardData.map((card, index) => ( - - -

- {card.title} - {card.description} -

-
- Its fast -
-
-
- ))} + + +

+ Build on top. + Make it your own through advanced customization and adjustability. +

+ +
+ its fast +
+
+
+ + + +

+ Template Store (Soon). + Choose a template from the community app store. Or submit your own template for others + to use. +

+ +
+ its fast +
+
+
); diff --git a/apps/web/src/components/(marketing)/share-connect-paid-widget-bento.tsx b/apps/web/src/components/(marketing)/share-connect-paid-widget-bento.tsx index 8c7fa74e5..05b6a3232 100644 --- a/apps/web/src/components/(marketing)/share-connect-paid-widget-bento.tsx +++ b/apps/web/src/components/(marketing)/share-connect-paid-widget-bento.tsx @@ -17,29 +17,6 @@ export const ShareConnectPaidWidgetBento = ({ className, ...props }: ShareConnectPaidWidgetBentoProps) => { - const cardData = [ - { - title: 'Connections (Soon).', - description: - 'Create connections and automations with Zapier and more to integrate with your favorite tools.', - image: cardConnectionsFigure, - imageSize: 'max-w-sm', - }, - { - title: 'Get paid (Soon).', - description: 'Integrated payments with stripe so you don’t have to worry about getting paid.', - image: cardPaidFigure, - imageSize: 'max-w-[14rem]', - }, - { - title: 'React Widget (Soon).', - description: - 'Easily embed Documenso into your product. Simply copy and paste our react widget into your application.', - image: cardWidgetFigure, - imageSize: 'max-w-xs', - }, - ]; - return (
@@ -68,19 +45,46 @@ export const ShareConnectPaidWidgetBento = ({ - {cardData.map((card, index) => ( - - -

- {card.title} - {card.description} -

-
- Its fast -
-
-
- ))} + + +

+ Connections (Soon). + Create connections and automations with Zapier and more to integrate with your + favorite tools. +

+ +
+ its fast +
+
+
+ + + +

+ Get paid (Soon). + Integrated payments with stripe so you don’t have to worry about getting paid. +

+ +
+ its fast +
+
+
+ + + +

+ React Widget (Soon). + Easily embed Documenso into your product. Simply copy and paste our react widget into + your application. +

+ +
+ its fast +
+
+
); From b5f96ee2fcb4767300fc13a2dac127451d1c187d Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Mon, 28 Aug 2023 12:53:51 +0530 Subject: [PATCH 14/48] chore: made requested changes - v2 Signed-off-by: Adithya Krishna --- .../src/components/(marketing)/footer.tsx | 98 ++++++------------- .../src/app/(dashboard)/documents/page.tsx | 44 ++++++--- .../web/src/components/(marketing)/footer.tsx | 20 ++-- 3 files changed, 69 insertions(+), 93 deletions(-) diff --git a/apps/marketing/src/components/(marketing)/footer.tsx b/apps/marketing/src/components/(marketing)/footer.tsx index 6ae66a0a4..ab0dd6e24 100644 --- a/apps/marketing/src/components/(marketing)/footer.tsx +++ b/apps/marketing/src/components/(marketing)/footer.tsx @@ -9,6 +9,22 @@ import { cn } from '@documenso/ui/lib/utils'; export type FooterProps = HTMLAttributes; +const SOCIAL_LINKS = [ + { href: 'https://twitter.com/documenso', icon: }, + { href: 'https://github.com/documenso/documenso', icon: }, + { href: 'https://documen.so/discord', icon: }, +]; + +const FOOTER_LINKS = [ + { href: '/pricing', text: 'Pricing' }, + { href: '/blog', text: 'Blog' }, + { href: '/open', text: 'Open' }, + { href: 'https://shop.documenso.com', text: 'Shop', target: '_blank' }, + { href: 'https://status.documenso.com', text: 'Status', target: '_blank' }, + { href: 'mailto:support@documenso.com', text: 'Support' }, + { href: '/privacy', text: 'Privacy' }, +]; + export const Footer = ({ className, ...props }: FooterProps) => { return (
@@ -19,77 +35,25 @@ export const Footer = ({ className, ...props }: FooterProps) => {
- - - - - - - - - - - + {SOCIAL_LINKS.map((link, index) => ( + + {link.icon} + + ))}
- - Pricing - - - - Blog - - - - Open - - - - Shop - - - - Status - - - - Support - - - - Privacy - + {FOOTER_LINKS.map((link, index) => ( + + {link.text} + + ))}
diff --git a/apps/web/src/app/(dashboard)/documents/page.tsx b/apps/web/src/app/(dashboard)/documents/page.tsx index 8ac33be51..834483757 100644 --- a/apps/web/src/app/(dashboard)/documents/page.tsx +++ b/apps/web/src/app/(dashboard)/documents/page.tsx @@ -64,12 +64,6 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage return `/documents?${params.toString()}`; }; - const documentStatuses = [ - InternalDocumentStatus.PENDING, - InternalDocumentStatus.COMPLETED, - InternalDocumentStatus.DRAFT, - ]; - return (
@@ -79,17 +73,35 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage
- {documentStatuses.map((status) => ( - - - + + + - - {Math.min(stats[status], 99)} - - - - ))} + + {Math.min(stats.PENDING, 99)} + + + + + + + + + + {Math.min(stats.COMPLETED, 99)} + + + + + + + + + + {Math.min(stats.DRAFT, 99)} + + + All diff --git a/apps/web/src/components/(marketing)/footer.tsx b/apps/web/src/components/(marketing)/footer.tsx index 255d91985..a5fadfcf8 100644 --- a/apps/web/src/components/(marketing)/footer.tsx +++ b/apps/web/src/components/(marketing)/footer.tsx @@ -3,7 +3,7 @@ import { HTMLAttributes } from 'react'; import Image from 'next/image'; import Link from 'next/link'; -import { Github, Slack, Twitter } from 'lucide-react'; +import { Github, MessagesSquare, Twitter } from 'lucide-react'; import { cn } from '@documenso/ui/lib/utils'; @@ -12,17 +12,17 @@ export type FooterProps = HTMLAttributes; const SOCIAL_LINKS = [ { href: 'https://twitter.com/documenso', icon: }, { href: 'https://github.com/documenso/documenso', icon: }, - { href: 'https://documenso.slack.com', icon: }, + { href: 'https://documen.so/discord', icon: }, +]; + +const FOOTER_LINKS = [ + { href: '/pricing', text: 'Pricing' }, + { href: 'https://status.documenso.com', text: 'Status', target: '_blank' }, + { href: 'mailto:support@documenso.com', text: 'Support' }, + // { href: '/privacy', text: 'Privacy'} ]; export const Footer = ({ className, ...props }: FooterProps) => { - const footerLinks = [ - { href: '/pricing', text: 'Pricing' }, - { href: 'https://status.documenso.com', text: 'Status', target: '_blank' }, - { href: 'mailto:support@documenso.com', text: 'Support' }, - // { href: '/privacy', text: 'Privacy'} - ]; - return (
@@ -41,7 +41,7 @@ export const Footer = ({ className, ...props }: FooterProps) => {
- {footerLinks.map((link, index) => ( + {FOOTER_LINKS.map((link, index) => ( Date: Mon, 28 Aug 2023 12:54:55 +0530 Subject: [PATCH 15/48] fix: reverted line change Signed-off-by: Adithya Krishna --- .../src/app/(signing)/sign/[token]/signing-field-container.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx b/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx index cdf6dee24..d5efcb3df 100644 --- a/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/signing-field-container.tsx @@ -72,6 +72,7 @@ export const SigningFieldContainer = ({ Remove )} + {children} From c161a8109b1d6558049e4f8a60fb364b8e1acd02 Mon Sep 17 00:00:00 2001 From: Adithya Krishna Date: Mon, 28 Aug 2023 12:58:30 +0530 Subject: [PATCH 16/48] fix: removed passHref and updated card Signed-off-by: Adithya Krishna --- .../src/app/(dashboard)/dashboard/page.tsx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/web/src/app/(dashboard)/dashboard/page.tsx b/apps/web/src/app/(dashboard)/dashboard/page.tsx index a9d650eb6..4fcf867ec 100644 --- a/apps/web/src/app/(dashboard)/dashboard/page.tsx +++ b/apps/web/src/app/(dashboard)/dashboard/page.tsx @@ -34,20 +34,22 @@ export default async function DashboardPage() { }), ]); + const cardData = [ + { icon: FileCheck, title: 'Completed', status: stats.COMPLETED }, + { icon: File, title: 'Drafts', status: stats.DRAFT }, + { icon: Clock, title: 'Pending', status: stats.PENDING }, + ]; + return (

Dashboard

- - - - - - - - - + {cardData.map((card) => ( + + + + ))}
From 9257454a96924aca6606976925dd8ffb99983721 Mon Sep 17 00:00:00 2001 From: PeterKwesiAnsah Date: Mon, 28 Aug 2023 14:11:53 +0100 Subject: [PATCH 17/48] feat: add error message to signature pad --- apps/web/src/components/forms/profile.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/forms/profile.tsx b/apps/web/src/components/forms/profile.tsx index d65a0ce27..5b4045abb 100644 --- a/apps/web/src/components/forms/profile.tsx +++ b/apps/web/src/components/forms/profile.tsx @@ -21,7 +21,7 @@ import { FormErrorMessage } from '../form/form-error-message'; export const ZProfileFormSchema = z.object({ name: z.string().min(1), - signature: z.string().min(1), + signature: z.string().min(1, 'Signature Pad cannot be empty'), }); export type TProfileFormSchema = z.infer; @@ -122,6 +122,7 @@ export const ProfileForm = ({ className, user }: ProfileFormProps) => { /> )} /> +
From ca40e983e3f35e8232477cb8e85061fcc35eff98 Mon Sep 17 00:00:00 2001 From: Mythie Date: Tue, 29 Aug 2023 13:01:19 +1000 Subject: [PATCH 18/48] feat: promise safety with eslint --- .eslintignore | 7 +++++++ .../src/app/(marketing)/[content]/page.tsx | 2 +- .../src/app/(marketing)/blog/[post]/page.tsx | 2 +- apps/marketing/src/app/(marketing)/open/page.tsx | 6 +++--- apps/marketing/src/app/(marketing)/page.tsx | 2 +- .../components/(marketing)/claim-plan-dialog.tsx | 4 +++- .../components/(marketing)/password-reveal.tsx | 2 +- .../src/components/(marketing)/widget.tsx | 6 ++++-- .../src/app/(signing)/sign/[token]/name-field.tsx | 2 +- .../(signing)/sign/[token]/signature-field.tsx | 2 +- .../(dashboard)/layout/profile-dropdown.tsx | 2 +- .../components/(marketing)/claim-plan-dialog.tsx | 4 +++- .../components/(marketing)/password-reveal.tsx | 2 +- apps/web/src/components/(marketing)/widget.tsx | 6 ++++-- apps/web/src/components/forms/signin.tsx | 5 +---- apps/web/src/helpers/get-feature-flag.ts | 4 ++-- .../web/src/helpers/get-post-hog-server-client.ts | 2 +- apps/web/src/middleware.ts | 2 +- apps/web/src/pages/api/trpc/[trpc].ts | 2 +- apps/web/src/providers/feature-flag.tsx | 4 ++-- packages/email/transports/mailchannels.ts | 7 ++++--- packages/eslint-config/index.cjs | 14 ++++++++++++++ packages/eslint-config/tsconfig.json | 9 +++++++++ packages/lib/next-auth/auth-options.ts | 2 +- packages/lib/next-auth/get-server-session.ts | 15 --------------- .../document/complete-document-with-token.ts | 2 +- packages/tailwind-config/tsconfig.json | 9 +++++++++ packages/trpc/server/trpc.ts | 4 ++-- packages/tsconfig/tsconfig.json | 8 ++++++++ packages/ui/primitives/document-dropzone.tsx | 2 +- .../ui/primitives/document-flow/add-fields.tsx | 4 +++- .../ui/primitives/document-flow/add-signers.tsx | 4 +++- .../ui/primitives/document-flow/add-subject.tsx | 4 +++- packages/ui/primitives/pdf-viewer.tsx | 2 +- packages/ui/primitives/signature-pad/canvas.ts | 6 ++++-- 35 files changed, 103 insertions(+), 57 deletions(-) create mode 100644 .eslintignore create mode 100644 packages/eslint-config/tsconfig.json create mode 100644 packages/tailwind-config/tsconfig.json create mode 100644 packages/tsconfig/tsconfig.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..f80dc7f80 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,7 @@ +# Config files +*.config.js +*.config.cjs + +# Statically hosted javascript files +apps/*/public/*.js +apps/*/public/*.cjs diff --git a/apps/marketing/src/app/(marketing)/[content]/page.tsx b/apps/marketing/src/app/(marketing)/[content]/page.tsx index f32765024..37d6d1b63 100644 --- a/apps/marketing/src/app/(marketing)/[content]/page.tsx +++ b/apps/marketing/src/app/(marketing)/[content]/page.tsx @@ -5,7 +5,7 @@ import { allDocuments } from 'contentlayer/generated'; import type { MDXComponents } from 'mdx/types'; import { useMDXComponent } from 'next-contentlayer/hooks'; -export const generateStaticParams = async () => +export const generateStaticParams = () => allDocuments.map((post) => ({ post: post._raw.flattenedPath })); export const generateMetadata = ({ params }: { params: { content: string } }) => { diff --git a/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx b/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx index 68f22e734..5192dec32 100644 --- a/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx +++ b/apps/marketing/src/app/(marketing)/blog/[post]/page.tsx @@ -7,7 +7,7 @@ import { ChevronLeft } from 'lucide-react'; import type { MDXComponents } from 'mdx/types'; import { useMDXComponent } from 'next-contentlayer/hooks'; -export const generateStaticParams = async () => +export const generateStaticParams = () => allBlogPosts.map((post) => ({ post: post._raw.flattenedPath })); export const generateMetadata = ({ params }: { params: { post: string } }) => { diff --git a/apps/marketing/src/app/(marketing)/open/page.tsx b/apps/marketing/src/app/(marketing)/open/page.tsx index 539e624c6..2d5bc2aa4 100644 --- a/apps/marketing/src/app/(marketing)/open/page.tsx +++ b/apps/marketing/src/app/(marketing)/open/page.tsx @@ -43,7 +43,7 @@ export default async function OpenPage() { accept: 'application/vnd.github.v3+json', }, }) - .then((res) => res.json()) + .then(async (res) => res.json()) .then((res) => ZGithubStatsResponse.parse(res)); const { total_count: mergedPullRequests } = await fetch( @@ -54,7 +54,7 @@ export default async function OpenPage() { }, }, ) - .then((res) => res.json()) + .then(async (res) => res.json()) .then((res) => ZMergedPullRequestsResponse.parse(res)); const STARGAZERS_DATA = await fetch('https://stargrazer-live.onrender.com/api/stats', { @@ -62,7 +62,7 @@ export default async function OpenPage() { accept: 'application/json', }, }) - .then((res) => res.json()) + .then(async (res) => res.json()) .then((res) => ZStargazersLiveResponse.parse(res)); return ( diff --git a/apps/marketing/src/app/(marketing)/page.tsx b/apps/marketing/src/app/(marketing)/page.tsx index 09e9e3dec..377384701 100644 --- a/apps/marketing/src/app/(marketing)/page.tsx +++ b/apps/marketing/src/app/(marketing)/page.tsx @@ -24,7 +24,7 @@ export default async function IndexPage() { accept: 'application/vnd.github.v3+json', }, }) - .then((res) => res.json()) + .then(async (res) => res.json()) .then((res) => (typeof res.stargazers_count === 'number' ? res.stargazers_count : undefined)) .catch(() => undefined); diff --git a/apps/marketing/src/components/(marketing)/claim-plan-dialog.tsx b/apps/marketing/src/components/(marketing)/claim-plan-dialog.tsx index f350a7e01..7de30bba3 100644 --- a/apps/marketing/src/components/(marketing)/claim-plan-dialog.tsx +++ b/apps/marketing/src/components/(marketing)/claim-plan-dialog.tsx @@ -63,7 +63,9 @@ export const ClaimPlanDialog = ({ className, planId, children }: ClaimPlanDialog const onFormSubmit = async ({ name, email }: TClaimPlanDialogFormSchema) => { try { - const delay = new Promise((resolve) => setTimeout(resolve, 1000)); + const delay = new Promise((resolve) => { + setTimeout(resolve, 1000); + }); const [redirectUrl] = await Promise.all([ claimPlan({ name, email, planId, signatureText: name, signatureDataUrl: null }), diff --git a/apps/marketing/src/components/(marketing)/password-reveal.tsx b/apps/marketing/src/components/(marketing)/password-reveal.tsx index 7e1cb72a3..b31765943 100644 --- a/apps/marketing/src/components/(marketing)/password-reveal.tsx +++ b/apps/marketing/src/components/(marketing)/password-reveal.tsx @@ -13,7 +13,7 @@ export const PasswordReveal = ({ password }: PasswordRevealProps) => { const [, copy] = useCopyToClipboard(); const onCopyClick = () => { - copy(password).then(() => { + void copy(password).then(() => { toast({ title: 'Copied to clipboard', description: 'Your password has been copied to your clipboard.', diff --git a/apps/marketing/src/components/(marketing)/widget.tsx b/apps/marketing/src/components/(marketing)/widget.tsx index 1a15069e9..15e15d04c 100644 --- a/apps/marketing/src/components/(marketing)/widget.tsx +++ b/apps/marketing/src/components/(marketing)/widget.tsx @@ -124,7 +124,7 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => { setValue('signatureDataUrl', draftSignatureDataUrl); setValue('signatureText', ''); - trigger('signatureDataUrl'); + void trigger('signatureDataUrl'); setShowSigningDialog(false); }; @@ -135,7 +135,9 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => { signatureText, }: TWidgetFormSchema) => { try { - const delay = new Promise((resolve) => setTimeout(resolve, 1000)); + const delay = new Promise((resolve) => { + setTimeout(resolve, 1000); + }); // eslint-disable-next-line turbo/no-undeclared-env-vars const planId = process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID; diff --git a/apps/web/src/app/(signing)/sign/[token]/name-field.tsx b/apps/web/src/app/(signing)/sign/[token]/name-field.tsx index f200d94cd..9688619fa 100644 --- a/apps/web/src/app/(signing)/sign/[token]/name-field.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/name-field.tsx @@ -149,7 +149,7 @@ export const NameField = ({ field, recipient }: NameFieldProps) => { disabled={!localFullName} onClick={() => { setShowFullNameModal(false); - onSign('local'); + void onSign('local'); }} > Sign diff --git a/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx b/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx index bbc58b5e8..03fc40914 100644 --- a/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx @@ -182,7 +182,7 @@ export const SignatureField = ({ field, recipient }: SignatureFieldProps) => { disabled={!localSignature} onClick={() => { setShowSignatureModal(false); - onSign('local'); + void onSign('local'); }} > Sign diff --git a/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx b/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx index f7d14c39d..02af86d70 100644 --- a/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx +++ b/apps/web/src/components/(dashboard)/layout/profile-dropdown.tsx @@ -118,7 +118,7 @@ export const ProfileDropdown = ({ user }: ProfileDropdownProps) => { - signOut({ + void signOut({ callbackUrl: '/', }) } diff --git a/apps/web/src/components/(marketing)/claim-plan-dialog.tsx b/apps/web/src/components/(marketing)/claim-plan-dialog.tsx index 06bfd5ced..1f78c5292 100644 --- a/apps/web/src/components/(marketing)/claim-plan-dialog.tsx +++ b/apps/web/src/components/(marketing)/claim-plan-dialog.tsx @@ -63,7 +63,9 @@ export const ClaimPlanDialog = ({ className, planId, children }: ClaimPlanDialog const onFormSubmit = async ({ name, email }: TClaimPlanDialogFormSchema) => { try { - const delay = new Promise((resolve) => setTimeout(resolve, 1000)); + const delay = new Promise((resolve) => { + setTimeout(resolve, 1000); + }); const [redirectUrl] = await Promise.all([ claimPlan({ name, email, planId, signatureText: name, signatureDataUrl: null }), diff --git a/apps/web/src/components/(marketing)/password-reveal.tsx b/apps/web/src/components/(marketing)/password-reveal.tsx index 7e1cb72a3..b31765943 100644 --- a/apps/web/src/components/(marketing)/password-reveal.tsx +++ b/apps/web/src/components/(marketing)/password-reveal.tsx @@ -13,7 +13,7 @@ export const PasswordReveal = ({ password }: PasswordRevealProps) => { const [, copy] = useCopyToClipboard(); const onCopyClick = () => { - copy(password).then(() => { + void copy(password).then(() => { toast({ title: 'Copied to clipboard', description: 'Your password has been copied to your clipboard.', diff --git a/apps/web/src/components/(marketing)/widget.tsx b/apps/web/src/components/(marketing)/widget.tsx index 1a15069e9..15e15d04c 100644 --- a/apps/web/src/components/(marketing)/widget.tsx +++ b/apps/web/src/components/(marketing)/widget.tsx @@ -124,7 +124,7 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => { setValue('signatureDataUrl', draftSignatureDataUrl); setValue('signatureText', ''); - trigger('signatureDataUrl'); + void trigger('signatureDataUrl'); setShowSigningDialog(false); }; @@ -135,7 +135,9 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => { signatureText, }: TWidgetFormSchema) => { try { - const delay = new Promise((resolve) => setTimeout(resolve, 1000)); + const delay = new Promise((resolve) => { + setTimeout(resolve, 1000); + }); // eslint-disable-next-line turbo/no-undeclared-env-vars const planId = process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID; diff --git a/apps/web/src/components/forms/signin.tsx b/apps/web/src/components/forms/signin.tsx index 9e9a01976..2ffb2798e 100644 --- a/apps/web/src/components/forms/signin.tsx +++ b/apps/web/src/components/forms/signin.tsx @@ -76,10 +76,7 @@ export const SignInForm = ({ className }: SignInFormProps) => { return (
{ - e.preventDefault(); - handleSubmit(onFormSubmit)(); - }} + onSubmit={handleSubmit(onFormSubmit)} >