diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index b7f7e638f..000000000 --- a/.eslintignore +++ /dev/null @@ -1,8 +0,0 @@ -# Config files -*.config.js -*.config.cjs - -# Statically hosted javascript files -apps/*/public/*.js -apps/*/public/*.cjs -scripts/ diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 455860ea1..000000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,16 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - root: true, - extends: ['@documenso/eslint-config'], - rules: { - '@next/next/no-img-element': 'off', - 'no-unreachable': 'error', - 'react-hooks/exhaustive-deps': 'off', - }, - settings: { - next: { - rootDir: ['apps/*/'], - }, - }, - ignorePatterns: ['lingui.config.ts', 'packages/lib/translations/**/*.js'], -}; diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 000000000..7261c287a --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,33 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "printWidth": 100, + "tabWidth": 2, + "semi": true, + "singleQuote": true, + "trailingComma": "all", + "arrowParens": "always", + "importOrder": [ + "^server-only|client-only$", + "^react$", + "^next(/.*)?$", + "", + "^@documenso/(.*)$", + "^~/(.*)$", + "^[./]" + ], + "importOrderSeparation": true, + "importOrderSortSpecifiers": true, + "sortTailwindcss": { + "functions": ["cn", "cva"] + }, + "sortPackageJson": false, + "ignorePatterns": [ + "packages/lib/translations/**/*.js", + "*.test.ts", + "apps/docs/content/**/*.mdx", + "*.css", + "*.po", + "*.md", + "*.json" + ] +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 000000000..8fffddfcb --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,50 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["typescript", "import", "react", "nextjs", "promise"], + "env": { "browser": true, "node": true, "es2022": true }, + "categories": { "correctness": "error" }, + "rules": { + "eslint/no-unused-vars": [ + "warn", + { + "vars": "all", + "varsIgnorePattern": "^_", + "args": "after-used", + "argsIgnorePattern": "^_", + "destructuredArrayIgnorePattern": "^_" + } + ], + + "eslint/no-promise-executor-return": "error", + "eslint/prefer-promise-reject-errors": "error", + "eslint/no-unreachable": "error", + + "typescript/no-floating-promises": "error", + "typescript/no-misused-promises": ["error", { "checksVoidReturn": { "attributes": false } }], + "typescript/promise-function-async": "error", + "typescript/require-await": "error", + "typescript/consistent-type-assertions": ["warn", { "assertionStyle": "never" }], + "typescript/consistent-type-imports": [ + "warn", + { + "prefer": "type-imports", + "fixStyle": "separate-type-imports", + "disallowTypeAnnotations": false + } + ], + + "react/no-unescaped-entities": "off", + "react/exhaustive-deps": "off", + "nextjs/no-html-link-for-pages": "off", + "nextjs/no-img-element": "off" + }, + "ignorePatterns": [ + "*.config.js", + "*.config.cjs", + "apps/*/public/*.js", + "apps/*/public/*.cjs", + "scripts/", + "lingui.config.ts", + "packages/lib/translations/**/*.js" + ] +} diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index f5c70c1d5..000000000 --- a/.prettierignore +++ /dev/null @@ -1,20 +0,0 @@ -node_modules -.next -public -**/**/node_modules -**/**/.next -**/**/public -packages/lib/translations/**/*.js - -*.lock -*.log -*.test.ts - -.gitignore -.npmignore -.prettierignore -.DS_Store -.eslintignore - -# Docs MDX - Prettier strips indentation from code blocks inside components -apps/docs/content/**/*.mdx diff --git a/apps/docs/src/app/og/docs/[...slug]/route.tsx b/apps/docs/src/app/og/docs/[...slug]/route.tsx index 1a7153f47..8dd602453 100644 --- a/apps/docs/src/app/og/docs/[...slug]/route.tsx +++ b/apps/docs/src/app/og/docs/[...slug]/route.tsx @@ -40,104 +40,102 @@ export async function GET(_req: Request, { params }: RouteContext<'/og/docs/[... const { logoSrc, fonts } = await loadAssets(); return new ImageResponse( - ( +
+ {/* Green accent bar */} +
+ + {/* Top: Logo */} +
+ {/* eslint-disable-next-line @next/next/no-img-element */} + Documenso + + | + + Docs +
+ + {/* Middle: Title + description */}
- {/* Green accent bar */} -
- - {/* Top: Logo */} -
40 ? '48px' : '56px', + fontWeight: 700, + lineHeight: 1.15, + letterSpacing: '-0.025em', + margin: 0, }} > - {/* eslint-disable-next-line @next/next/no-img-element */} - Documenso - + {page.data.description && ( +

- | - - Docs -

- - {/* Middle: Title + description */} -
-

40 ? '48px' : '56px', - fontWeight: 700, - lineHeight: 1.15, - letterSpacing: '-0.025em', + lineHeight: 1.4, margin: 0, + maxWidth: '900px', + overflow: 'hidden', + textOverflow: 'ellipsis', + display: '-webkit-box', + WebkitLineClamp: 2, + WebkitBoxOrient: 'vertical', }} > - {page.data.title} -

- {page.data.description && ( -

- {page.data.description} -

- )} -
- - {/* Bottom: URL */} -
- - docs.documenso.com{page.url} - -
+ {page.data.description} +

+ )}
- ), + + {/* Bottom: URL */} +
+ + docs.documenso.com{page.url} + +
+
, { width: 1200, height: 630, diff --git a/apps/openpage-api/package.json b/apps/openpage-api/package.json index 8657dca8d..0a82e1fff 100644 --- a/apps/openpage-api/package.json +++ b/apps/openpage-api/package.json @@ -6,7 +6,7 @@ "dev": "next dev -p 3003", "build": "next build", "start": "next start -p 3003", - "lint:fix": "next lint --fix", + "lint:fix": "oxlint --type-aware --fix .", "clean": "rimraf .next && rimraf node_modules" }, "dependencies": { diff --git a/apps/remix/app/components/dialogs/account-delete-dialog.tsx b/apps/remix/app/components/dialogs/account-delete-dialog.tsx index 5c528dfc4..2302cf626 100644 --- a/apps/remix/app/components/dialogs/account-delete-dialog.tsx +++ b/apps/remix/app/components/dialogs/account-delete-dialog.tsx @@ -122,7 +122,7 @@ export const AccountDeleteDialog = ({ className }: AccountDeleteDialogProps) => diff --git a/apps/remix/app/components/dialogs/assistant-confirmation-dialog.tsx b/apps/remix/app/components/dialogs/assistant-confirmation-dialog.tsx index 16e9a5719..f148633e9 100644 --- a/apps/remix/app/components/dialogs/assistant-confirmation-dialog.tsx +++ b/apps/remix/app/components/dialogs/assistant-confirmation-dialog.tsx @@ -115,7 +115,7 @@ export function AssistantConfirmationDialog({
{!isEditingNextSigner && (
-

+

The next recipient to sign this document will be{' '} {form.watch('name')} ( diff --git a/apps/remix/app/components/dialogs/document-move-to-folder-dialog.tsx b/apps/remix/app/components/dialogs/document-move-to-folder-dialog.tsx index 45ec1465a..06c5f60c2 100644 --- a/apps/remix/app/components/dialogs/document-move-to-folder-dialog.tsx +++ b/apps/remix/app/components/dialogs/document-move-to-folder-dialog.tsx @@ -165,7 +165,7 @@ export const DocumentMoveToFolderDialog = ({

- + +
No folders found
)} diff --git a/apps/remix/app/components/dialogs/document-resend-dialog.tsx b/apps/remix/app/components/dialogs/document-resend-dialog.tsx index d8c0a73ee..1bfb6cb88 100644 --- a/apps/remix/app/components/dialogs/document-resend-dialog.tsx +++ b/apps/remix/app/components/dialogs/document-resend-dialog.tsx @@ -183,7 +183,7 @@ export const DocumentResendDialog = ({ document, recipients }: DocumentResendDia