[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESlint and Conform Apps & Packages #589

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7534bba
use RSCs in @dub/ui
versecafe Jan 19, 2024
e3d5016
remove accidental temp comment from readme
versecafe Jan 19, 2024
9dd7fed
final UI component that can be moved
versecafe Jan 20, 2024
c6aa72f
clean unused code and document change
versecafe Jan 20, 2024
7ce96c1
typo cleanup
versecafe Jan 20, 2024
16a75db
Merge branch 'dubinc:main' into use-rscs-in-ui-package
versecafe Jan 20, 2024
469bf4f
eslitn package + configs set up
versecafe Jan 29, 2024
698d09a
partial packages eslint conformance
versecafe Jan 29, 2024
dffc46c
Merge branch 'main' into eslint
versecafe Jan 29, 2024
71725e5
Merge branch 'main' into pr/572
steven-tey Jan 30, 2024
fc51c6b
Merge branch 'use-rscs-in-ui-package' of https://github.com/versecafe…
steven-tey Jan 30, 2024
bcadf64
Update pnpm-lock.yaml
steven-tey Jan 30, 2024
e825fe8
small fixes
steven-tey Jan 30, 2024
cfe62fb
Merge branch 'main' into eslint
versecafe Feb 4, 2024
d19b356
fix lockfile
versecafe Feb 4, 2024
a053826
turbo.json fix caching behaviour for env var update, and fix minor er…
versecafe Feb 4, 2024
f33ee0a
Merge branch 'dubinc:main' into use-rscs-in-ui-package
versecafe Feb 4, 2024
5a6c03a
Merge branch 'temp-test' into eslint
versecafe Feb 4, 2024
be1f9a2
Revert "Merge branch 'temp-test' into eslint"
versecafe Feb 4, 2024
405c271
fix pnpm lock
versecafe Feb 5, 2024
3eccb0a
further compliance ui from 82 to 57 problems
versecafe Feb 5, 2024
e78d84f
minor cleaning
versecafe Feb 5, 2024
8b13f90
clean web to bring conformance up
versecafe Feb 5, 2024
b5b77a9
Merge branch 'main' into eslint
versecafe Feb 5, 2024
6768190
fix up lockfile
versecafe Feb 5, 2024
63246e6
Merge branch 'main' into eslint
versecafe Feb 6, 2024
141d4fb
Merge branch 'main' into eslint
versecafe Feb 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
turbo.json fix caching behaviour for env var update, and fix minor er…
…rors
  • Loading branch information
versecafe committed Feb 4, 2024
commit a053826b880e5c18b80e90b88b3e758055aa72cd
47 changes: 47 additions & 0 deletions apps/web/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"env": [
"DATABASE_URL",
"NEXT_PUBLIC_APP_NAME",
"VERCEL_ENV",
"VERCEL",
"VERCEL_URL",
"NODE_ENV",
"NEXTAUTH_SECRET",
"NEXTAUTH_URL",
"NEXT_PUBLIC_IS_DUB",
"NEXT_PUBLIC_APP_NAME",
"NEXT_PUBLIC_APP_DOMAIN",
"TEAM_ID_VERCEL",
"PROJECT_ID_VERCEL",
"AUTH_BEARER_TOKEN",
"CRON_SECRET",
"TINYBIRD_API_KEY",
"UPSTASH_REDIS_REST_URL",
"UPSTASH_REDIS_REST_TOKEN",
"RATELIMIT_UPSTASH_REDIS_REST_URL",
"RATELIMIT_UPSTASH_REDIS_REST_TOKEN",
"QSTASH_TOKEN",
"QSTASH_CURRENT_SIGNING_KEY",
"QSTASH_NEXT_SIGNING_KEY",
"RESEND_API_KEY",
"RESEND_AUDIENCE_ID",
"STRIPE_SECRET_KEY",
"STRIPE_SECRET_KEY_LIVE",
"NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY",
"NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY_LIVE",
"GOOGLE_CLIENT_ID",
"GOOGLE_CLIENT_SECRET",
"GITHUB_CLIENT_ID",
"GITHUB_CLIENT_SECRET",
"NEXT_PUBLIC_BITLY_REDIRECT_URI",
"BITLY_CLIENT_SECRET",
"UNSPLASH_ACCESS_KEY",
"CLOUDINARY_URL"
],
"outputs": [".next/**"]
}
}
}
9 changes: 6 additions & 3 deletions packages/ui/src/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ export function Button({
<Tooltip content={disabledTooltip}>
<div className="flex h-10 w-full cursor-not-allowed items-center justify-center space-x-2 rounded-md border border-gray-200 bg-gray-100 px-4 text-sm text-gray-400 transition-all focus:outline-none">
<p>{text}</p>
{shortcut ? <kbd className="hidden rounded bg-zinc-200 px-2 py-0.5 text-xs font-light text-gray-400 md:inline-block">
{shortcut ? (
<kbd className="hidden rounded bg-zinc-200 px-2 py-0.5 text-xs font-light text-gray-400 md:inline-block">
{shortcut}
</kbd> : null}
</kbd>
) : null}
</div>
</Tooltip>
);
Expand Down Expand Up @@ -65,7 +67,8 @@ export function Button({
{shortcut && (
<kbd className="hidden rounded bg-zinc-700 px-2 py-0.5 text-xs font-light text-gray-400 transition-all duration-75 group-hover:bg-gray-100 group-hover:text-gray-500 md:inline-block">
{shortcut}
</kbd> : null}
</kbd>
)}
</button>
);
}
9 changes: 5 additions & 4 deletions packages/ui/src/icons/google.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
export default function Google({ className }: { className?: string }): JSX.Element {
export default function Google({
className,
}: {
className?: string;
}): JSX.Element {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
height="24"
viewBox="0 0 24 24"
width="24"
className={className}
fill="currentColor"
viewBox="0 0 488 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
Expand Down
23 changes: 13 additions & 10 deletions packages/ui/src/link-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { useDebounce } from "use-debounce";
import { useMediaQuery } from "./hooks";
import { LoadingCircle, Photo } from "./icons";

export function LinkPreview({ defaultUrl }: { defaultUrl?: string }): JSX.Element {
export function LinkPreview({
defaultUrl,
}: {
defaultUrl?: string;
}): JSX.Element {
const router = useRouter();
const searchParams = useSearchParams();
const url =
Expand Down Expand Up @@ -44,21 +48,18 @@ export function LinkPreview({ defaultUrl }: { defaultUrl?: string }): JSX.Elemen
<div className="relative flex items-center">
<Link2 className="absolute inset-y-0 left-0 my-2 ml-3 w-5 text-gray-400" />
<input
ref={inputRef}
name="url"
id="url"
type="url"
aria-invalid="true"
autoFocus={!isMobile}
className="block w-full rounded-md border-gray-200 pl-10 text-sm text-gray-900 placeholder-gray-400 shadow-lg focus:border-gray-500 focus:outline-none focus:ring-gray-500"
defaultValue={url}
id="url"
name="url"
=>
{ router.replace(
router.replace(
`/tools/metatags${
e.target.value.length > 0 ? `?url=${e.target.value}` : ""
}`,
); }
)
}
placeholder="Enter your URL"
ref={inputRef}
Expand All @@ -68,9 +69,11 @@ export function LinkPreview({ defaultUrl }: { defaultUrl?: string }): JSX.Elemen
)}

<div className="relative overflow-hidden rounded-md border border-gray-300 bg-gray-50">
{isValidating ? <div className="absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300 bg-gray-50">
{isValidating ? (
<div className="absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300 bg-gray-50">
<LoadingCircle />
</div> : null}
</div>
) : null}
{image ? (
<img
alt="Preview"
Expand Down Expand Up @@ -116,7 +119,7 @@ export function LinkPreviewPlaceholder({
defaultUrl,
}: {
defaultUrl?: string;
}) {
}): JSX.Element {
return (
<>
<div className="relative flex items-center">
Expand Down
9 changes: 9 additions & 0 deletions packages/ui/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"env": ["NEXT_PUBLIC_APP_NAME"],
"outputs": [".next/**"]
}
}
}
21 changes: 21 additions & 0 deletions packages/utils/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"env": [
"NEXT_PUBLIC_APP_SHORT_DOMAIN",
"NEXT_PUBLIC_APP_DOMAIN",
"NEXT_PUBLIC_APP_NAME",
"NEXT_PUBLIC_VERCEL_ENV",
"NEXT_PUBLIC_IS_DUB",
"NGROK_URL",
"NODE_ENV",
"DUB_SLACK_HOOK_ALERTS",
"DUB_SLACK_HOOK_CRON",
"DUB_SLACK_HOOK_LINKS",
"DUB_SLACK_HOOK_ERRORS"
],
"outputs": [".next/**"]
}
}
}