mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-13 00:46:48 +02:00
🎨 Add linting and prettier to more places (#1432)
This commit is contained in:
parent
de6963db4f
commit
ee68d80026
70 changed files with 136 additions and 141 deletions
|
@ -9,8 +9,7 @@
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"type-check": "tsc --pretty --noEmit",
|
"type-check": "tsc --pretty --noEmit",
|
||||||
"i18n:scan": "i18next-scanner --config i18next-scanner.config.js",
|
"i18n:scan": "i18next-scanner --config i18next-scanner.config.js"
|
||||||
"prettier": "prettier --write ./src"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rallly/billing": "*",
|
"@rallly/billing": "*",
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"],
|
"@/*": ["src/*"],
|
||||||
"~/*": ["public/*"],
|
"~/*": ["public/*"]
|
||||||
},
|
},
|
||||||
"checkJs": false,
|
"checkJs": false,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
1
apps/web/declarations/next-auth.d.ts
vendored
1
apps/web/declarations/next-auth.d.ts
vendored
|
@ -1,6 +1,5 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
import type { TimeFormat } from "@rallly/database";
|
import type { TimeFormat } from "@rallly/database";
|
||||||
import { extend } from "lodash";
|
|
||||||
import type { DefaultSession, DefaultUser } from "next-auth";
|
import type { DefaultSession, DefaultUser } from "next-auth";
|
||||||
import NextAuth from "next-auth";
|
import NextAuth from "next-auth";
|
||||||
import type { DefaultJWT } from "next-auth/jwt";
|
import type { DefaultJWT } from "next-auth/jwt";
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"type-check": "tsc --pretty --noEmit",
|
"type-check": "tsc --pretty --noEmit",
|
||||||
"i18n:scan": "i18next-scanner --config i18next-scanner.config.js",
|
"i18n:scan": "i18next-scanner --config i18next-scanner.config.js",
|
||||||
"prettier": "prettier --write ./src",
|
|
||||||
"test:integration": "NODE_ENV=test playwright test",
|
"test:integration": "NODE_ENV=test playwright test",
|
||||||
"test:unit": "vitest run",
|
"test:unit": "vitest run",
|
||||||
"test": "yarn test:unit && yarn test:e2e",
|
"test": "yarn test:unit && yarn test:e2e",
|
||||||
|
|
|
@ -16,5 +16,4 @@ Sentry.init({
|
||||||
|
|
||||||
// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
|
// Uncomment the line below to enable Spotlight (https://spotlightjs.com)
|
||||||
// spotlight: process.env.NODE_ENV === 'development',
|
// spotlight: process.env.NODE_ENV === 'development',
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
import { usePostHog } from "@rallly/posthog/client";
|
import { usePostHog } from "@rallly/posthog/client";
|
||||||
import { Button } from "@rallly/ui/button";
|
import { Button } from "@rallly/ui/button";
|
||||||
import type {
|
import type { DialogProps } from "@rallly/ui/dialog";
|
||||||
DialogProps} from "@rallly/ui/dialog";
|
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogClose,
|
DialogClose,
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
import { usePostHog } from "@rallly/posthog/client";
|
import { usePostHog } from "@rallly/posthog/client";
|
||||||
import { Button } from "@rallly/ui/button";
|
import { Button } from "@rallly/ui/button";
|
||||||
import type {
|
import type { DialogProps } from "@rallly/ui/dialog";
|
||||||
DialogProps} from "@rallly/ui/dialog";
|
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogClose,
|
DialogClose,
|
||||||
|
|
|
@ -13,11 +13,8 @@ import Link from "next/link";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
|
|
||||||
import type {
|
import type { PollDetailsData } from "@/components/forms/poll-details-form";
|
||||||
PollDetailsData} from "@/components/forms/poll-details-form";
|
import { PollDetailsForm } from "@/components/forms/poll-details-form";
|
||||||
import {
|
|
||||||
PollDetailsForm,
|
|
||||||
} from "@/components/forms/poll-details-form";
|
|
||||||
import { useUpdatePollMutation } from "@/components/poll/mutations";
|
import { useUpdatePollMutation } from "@/components/poll/mutations";
|
||||||
import { usePoll } from "@/components/poll-context";
|
import { usePoll } from "@/components/poll-context";
|
||||||
import { Trans } from "@/components/trans";
|
import { Trans } from "@/components/trans";
|
||||||
|
|
|
@ -6,11 +6,8 @@ import Link from "next/link";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
|
|
||||||
import type {
|
import type { PollSettingsFormData } from "@/components/forms/poll-settings";
|
||||||
PollSettingsFormData} from "@/components/forms/poll-settings";
|
import { PollSettingsForm } from "@/components/forms/poll-settings";
|
||||||
import {
|
|
||||||
PollSettingsForm
|
|
||||||
} from "@/components/forms/poll-settings";
|
|
||||||
import { useUpdatePollMutation } from "@/components/poll/mutations";
|
import { useUpdatePollMutation } from "@/components/poll/mutations";
|
||||||
import { Trans } from "@/components/trans";
|
import { Trans } from "@/components/trans";
|
||||||
import { usePoll } from "@/contexts/poll";
|
import { usePoll } from "@/contexts/poll";
|
||||||
|
|
|
@ -4,7 +4,11 @@ import * as Sentry from "@sentry/nextjs";
|
||||||
import NextError from "next/error";
|
import NextError from "next/error";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
|
||||||
export default function GlobalError({ error }: { error: Error & { digest?: string } }) {
|
export default function GlobalError({
|
||||||
|
error,
|
||||||
|
}: {
|
||||||
|
error: Error & { digest?: string };
|
||||||
|
}) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
Sentry.captureException(error);
|
Sentry.captureException(error);
|
||||||
}, [error]);
|
}, [error]);
|
||||||
|
|
|
@ -9,15 +9,8 @@ import {
|
||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from "@rallly/ui/dropdown-menu";
|
} from "@rallly/ui/dropdown-menu";
|
||||||
import { Icon } from "@rallly/ui/icon";
|
import { Icon } from "@rallly/ui/icon";
|
||||||
import type {
|
import type { CalendarEvent } from "calendar-link";
|
||||||
CalendarEvent} from "calendar-link";
|
import { google, ics, office365, outlook, yahoo } from "calendar-link";
|
||||||
import {
|
|
||||||
google,
|
|
||||||
ics,
|
|
||||||
office365,
|
|
||||||
outlook,
|
|
||||||
yahoo,
|
|
||||||
} from "calendar-link";
|
|
||||||
import { DownloadIcon, PlusIcon } from "lucide-react";
|
import { DownloadIcon, PlusIcon } from "lucide-react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,8 @@
|
||||||
|
|
||||||
import { pricingData } from "@rallly/billing/pricing";
|
import { pricingData } from "@rallly/billing/pricing";
|
||||||
import { Badge } from "@rallly/ui/badge";
|
import { Badge } from "@rallly/ui/badge";
|
||||||
import type {
|
import type { DialogProps } from "@rallly/ui/dialog";
|
||||||
DialogProps} from "@rallly/ui/dialog";
|
import { Dialog, DialogContent, useDialog } from "@rallly/ui/dialog";
|
||||||
import {
|
|
||||||
Dialog,
|
|
||||||
DialogContent,
|
|
||||||
useDialog,
|
|
||||||
} from "@rallly/ui/dialog";
|
|
||||||
import { RadioGroup, RadioGroupItem } from "@rallly/ui/radio-group";
|
import { RadioGroup, RadioGroupItem } from "@rallly/ui/radio-group";
|
||||||
import { m } from "framer-motion";
|
import { m } from "framer-motion";
|
||||||
import { CheckIcon } from "lucide-react";
|
import { CheckIcon } from "lucide-react";
|
||||||
|
|
|
@ -8,10 +8,9 @@ import React from "react";
|
||||||
import type { GetPollApiResponse, Vote } from "@/trpc/client/types";
|
import type { GetPollApiResponse, Vote } from "@/trpc/client/types";
|
||||||
import type {
|
import type {
|
||||||
ParsedDateOption,
|
ParsedDateOption,
|
||||||
ParsedTimeSlotOption} from "@/utils/date-time-utils";
|
ParsedTimeSlotOption,
|
||||||
import {
|
|
||||||
getDuration
|
|
||||||
} from "@/utils/date-time-utils";
|
} from "@/utils/date-time-utils";
|
||||||
|
import { getDuration } from "@/utils/date-time-utils";
|
||||||
import { useDayjs } from "@/utils/dayjs";
|
import { useDayjs } from "@/utils/dayjs";
|
||||||
|
|
||||||
import ErrorPage from "./error-page";
|
import ErrorPage from "./error-page";
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { cn } from "@rallly/ui";
|
import { cn } from "@rallly/ui";
|
||||||
import { Button } from "@rallly/ui/button";
|
import { Button } from "@rallly/ui/button";
|
||||||
import type {
|
import type { DialogProps } from "@rallly/ui/dialog";
|
||||||
DialogProps} from "@rallly/ui/dialog";
|
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogClose,
|
DialogClose,
|
||||||
|
|
|
@ -3,22 +3,17 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"],
|
"@/*": ["src/*"]
|
||||||
},
|
},
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"types": ["vitest/globals"],
|
"types": ["vitest/globals"]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
"**/*.tsx",
|
"**/*.tsx",
|
||||||
"**/*.js",
|
"**/*.js",
|
||||||
".next/types/**/*.ts",
|
".next/types/**/*.ts",
|
||||||
"vitest.config.mts",
|
"vitest.config.mts"
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
|
||||||
".next/**/*",
|
|
||||||
"playwright-report",
|
|
||||||
"test-results",
|
|
||||||
],
|
],
|
||||||
|
"exclude": ["node_modules", ".next/**/*", "playwright-report", "test-results"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"lint": "turbo lint",
|
"lint": "turbo lint",
|
||||||
"i18n:scan": "turbo i18n:scan",
|
"i18n:scan": "turbo i18n:scan",
|
||||||
"type-check": "turbo type-check",
|
"type-check": "turbo type-check",
|
||||||
"prettier": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"release": "./scripts/create-release.sh",
|
"release": "./scripts/create-release.sh",
|
||||||
"sherif": "npx sherif@latest",
|
"sherif": "npx sherif@latest",
|
||||||
"sherif:fix": "npx sherif@latest --fix"
|
"sherif:fix": "npx sherif@latest --fix"
|
||||||
|
@ -44,8 +44,8 @@
|
||||||
"framer-motion": "^10.16.4",
|
"framer-motion": "^10.16.4",
|
||||||
"next": "^14.2.13",
|
"next": "^14.2.13",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"prettier": "^3.2.4",
|
"prettier": "^3.3.3",
|
||||||
"prettier-plugin-tailwindcss": "^0.5.11",
|
"prettier-plugin-tailwindcss": "^0.6.8",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"tailwindcss": "^3.4.4",
|
"tailwindcss": "^3.4.4",
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
/** @type {import("eslint").Linter.Config} */
|
/** @type {import("eslint").Linter.Config} */
|
||||||
module.exports = {
|
module.exports = require("@rallly/eslint-config/preset")(__dirname);
|
||||||
...require("@rallly/eslint-config")(__dirname),
|
|
||||||
};
|
|
||||||
|
|
|
@ -10,12 +10,16 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"normalize-subscription-metadata": "dotenv -e ../../.env -- tsx ./src/scripts/normalize-metadata.ts",
|
"normalize-subscription-metadata": "dotenv -e ../../.env -- tsx ./src/scripts/normalize-metadata.ts",
|
||||||
"type-check": "tsc --pretty --noEmit"
|
"type-check": "tsc --pretty --noEmit",
|
||||||
|
"lint": "eslint ./src"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@radix-ui/react-radio-group": "^1.2.0",
|
"@radix-ui/react-radio-group": "^1.2.0",
|
||||||
"@rallly/ui": "*",
|
"@rallly/ui": "*",
|
||||||
"next": "*",
|
"next": "*",
|
||||||
"stripe": "^13.2.0"
|
"stripe": "^13.2.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@rallly/eslint-config": "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "@rallly/tsconfig/next.json",
|
"extends": "@rallly/tsconfig/next.json",
|
||||||
"include": ["**/*.ts", "**/*.tsx", "**/*.js"],
|
"include": ["**/*.ts", "**/*.tsx", "**/*.js"],
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "@rallly/tsconfig/next.json",
|
"extends": "@rallly/tsconfig/next.json",
|
||||||
"include": ["**/*.ts", "**/*.tsx"],
|
"include": ["**/*.ts", "**/*.tsx"],
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
/** @type {import("eslint").Linter.Config} */
|
/** @type {import("eslint").Linter.Config} */
|
||||||
module.exports = {
|
module.exports = require("@rallly/eslint-config/preset")(__dirname);
|
||||||
...require("@rallly/eslint-config/preset")(__dirname),
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import type {
|
import type {
|
||||||
LinkProps,
|
LinkProps,
|
||||||
SectionProps,
|
SectionProps,
|
||||||
TextProps} from "@react-email/components";
|
TextProps,
|
||||||
|
} from "@react-email/components";
|
||||||
import {
|
import {
|
||||||
Button as UnstyledButton,
|
Button as UnstyledButton,
|
||||||
Heading as UnstyledHeading,
|
Heading as UnstyledHeading,
|
||||||
Link as UnstyledLink,
|
Link as UnstyledLink,
|
||||||
Section as UnstyledSection,
|
Section as UnstyledSection,
|
||||||
Text as UnstyledText
|
Text as UnstyledText,
|
||||||
} from "@react-email/components";
|
} from "@react-email/components";
|
||||||
|
|
||||||
import type { EmailContext } from "../types";
|
import type { EmailContext } from "../types";
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { Trans } from "react-i18next/TransWithoutContext";
|
import { Trans } from "react-i18next/TransWithoutContext";
|
||||||
|
|
||||||
import type {
|
import type { NotificationBaseProps } from "../components/notification-email";
|
||||||
NotificationBaseProps,
|
|
||||||
} from "../components/notification-email";
|
|
||||||
import NotificationEmail from "../components/notification-email";
|
import NotificationEmail from "../components/notification-email";
|
||||||
import { Heading, Text } from "../components/styled-components";
|
import { Heading, Text } from "../components/styled-components";
|
||||||
import type { EmailContext } from "../types";
|
import type { EmailContext } from "../types";
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true
|
||||||
},
|
},
|
||||||
"files": ["i18next.d.ts"],
|
"files": ["i18next.d.ts"],
|
||||||
"include": ["**/*.ts", "**/*.tsx"],
|
"include": ["**/*.ts", "**/*.tsx"],
|
||||||
"exclude": ["node_modules", ".react-email"],
|
"exclude": ["node_modules", ".react-email"]
|
||||||
}
|
}
|
||||||
|
|
8
packages/eslint-config/.eslintrc.js
Normal file
8
packages/eslint-config/.eslintrc.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/** @type {import("eslint").Linter.Config} */
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
extends: ["turbo"],
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
};
|
|
@ -18,7 +18,7 @@ module.exports = function (workspaceDirPath) {
|
||||||
},
|
},
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
tsconfigRootDir: workspaceDirPath,
|
tsconfigRootDir: workspaceDirPath,
|
||||||
project: `${workspaceDirPath}/tsconfig.json`,
|
project: workspaceDirPath + "/tsconfig.json",
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,14 @@ module.exports = function (workspaceDirPath) {
|
||||||
extends: ["plugin:@typescript-eslint/recommended"],
|
extends: ["plugin:@typescript-eslint/recommended"],
|
||||||
rules: {
|
rules: {
|
||||||
"@typescript-eslint/no-unused-vars": "error",
|
"@typescript-eslint/no-unused-vars": "error",
|
||||||
|
"@typescript-eslint/consistent-type-imports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
prefer: "type-imports",
|
||||||
|
fixStyle: "separate-type-imports",
|
||||||
|
disallowTypeAnnotations: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -39,7 +47,6 @@ module.exports = function (workspaceDirPath) {
|
||||||
"import/no-duplicates": "error",
|
"import/no-duplicates": "error",
|
||||||
"no-console": ["error", { allow: ["warn", "error", "info"] }],
|
"no-console": ["error", { allow: ["warn", "error", "info"] }],
|
||||||
"no-unused-vars": "error",
|
"no-unused-vars": "error",
|
||||||
"@typescript-eslint/consistent-type-imports": "error",
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "@rallly/tsconfig/next.json",
|
"extends": "@rallly/tsconfig/next.json",
|
||||||
"include": ["**/*.ts", "**/*.tsx"],
|
"include": ["**/*.ts", "**/*.tsx"],
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "@rallly/tsconfig/base.json",
|
"extends": "@rallly/tsconfig/base.json",
|
||||||
"include": ["**/*.ts"],
|
"include": ["**/*.ts"],
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
"./client": "./src/client/index.ts",
|
"./client": "./src/client/index.ts",
|
||||||
"./next/middleware": "./src/next/middleware.ts"
|
"./next/middleware": "./src/next/middleware.ts"
|
||||||
},
|
},
|
||||||
|
"scripts": {
|
||||||
|
"lint": "eslint ./src",
|
||||||
|
"type-check": "tsc --noEmit"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"posthog-js": "^1.178.0",
|
"posthog-js": "^1.178.0",
|
||||||
"posthog-node": "^4.2.1"
|
"posthog-node": "^4.2.1"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { NextResponse } from "next/server";
|
import type { NextResponse } from "next/server";
|
||||||
|
|
||||||
import { POSTHOG_BOOTSTAP_DATA_COOKIE_NAME } from "../constants";
|
import { POSTHOG_BOOTSTAP_DATA_COOKIE_NAME } from "../constants";
|
||||||
|
|
||||||
const posthogApiKey = process.env.NEXT_PUBLIC_POSTHOG_API_KEY;
|
const posthogApiKey = process.env.NEXT_PUBLIC_POSTHOG_API_KEY;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "@rallly/tsconfig/next.json",
|
"extends": "@rallly/tsconfig/next.json",
|
||||||
"include": ["**/*.ts", "**/*.tsx"],
|
"include": ["**/*.ts", "**/*.tsx"],
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,10 @@ import type {VariantProps } from "class-variance-authority";
|
||||||
import { cva } from "class-variance-authority";
|
import { cva } from "class-variance-authority";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
|
||||||
import type { ComponentPropsWithout, RemovedProps } from "./helpers/component-props";
|
import type {
|
||||||
|
ComponentPropsWithout,
|
||||||
|
RemovedProps,
|
||||||
|
} from "./helpers/component-props";
|
||||||
import { cn } from "./lib/utils";
|
import { cn } from "./lib/utils";
|
||||||
|
|
||||||
type FlexElement = React.ElementRef<"div">;
|
type FlexElement = React.ElementRef<"div">;
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
import type * as LabelPrimitive from "@radix-ui/react-label";
|
import type * as LabelPrimitive from "@radix-ui/react-label";
|
||||||
import { Slot } from "@radix-ui/react-slot";
|
import { Slot } from "@radix-ui/react-slot";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import type {
|
import type { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
||||||
ControllerProps,
|
import { Controller, FormProvider, useFormContext } from "react-hook-form";
|
||||||
FieldPath,
|
|
||||||
FieldValues} from "react-hook-form";
|
|
||||||
import {
|
|
||||||
Controller,
|
|
||||||
FormProvider,
|
|
||||||
useFormContext,
|
|
||||||
} from "react-hook-form";
|
|
||||||
|
|
||||||
import { Label } from "./label";
|
import { Label } from "./label";
|
||||||
import { cn } from "./lib/utils";
|
import { cn } from "./lib/utils";
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import * as ToastPrimitives from "@radix-ui/react-toast";
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
||||||
import { type VariantProps,cva } from "class-variance-authority";
|
import type { VariantProps } from "class-variance-authority";
|
||||||
|
import { cva } from "class-variance-authority";
|
||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/utils": ["src/lib/utils.ts"],
|
"@/utils": ["src/lib/utils.ts"],
|
||||||
"@/components/*": ["src/*"],
|
"@/components/*": ["src/*"],
|
||||||
"@/ui/*": ["src/*"],
|
"@/ui/*": ["src/*"]
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts", "**/*.tsx"],
|
"include": ["**/*.ts", "**/*.tsx"],
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
2
packages/utils/.eslintrc.js
Normal file
2
packages/utils/.eslintrc.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/** @type {import("eslint").Linter.Config} */
|
||||||
|
module.exports = require("@rallly/eslint-config/preset")(__dirname);
|
|
@ -1,10 +1,11 @@
|
||||||
{
|
{
|
||||||
"name": "@rallly/utils",
|
"name": "@rallly/utils",
|
||||||
"type": "module",
|
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test:unit": "vitest run"
|
"test:unit": "vitest run",
|
||||||
|
"lint": "eslint ./src",
|
||||||
|
"type-check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
"./*": "./src/*.ts"
|
"./*": "./src/*.ts"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"types": ["vitest/globals"],
|
"types": ["vitest/globals"]
|
||||||
},
|
},
|
||||||
"extends": "@rallly/tsconfig/base.json",
|
"extends": "@rallly/tsconfig/base.json",
|
||||||
"include": ["**/*.ts", "**/*.tsx"],
|
"include": ["**/*.ts", "**/*.tsx"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,9 @@
|
||||||
"i18n:scan": {
|
"i18n:scan": {
|
||||||
"inputs": ["src/**", "i18next-scanner.config.js"],
|
"inputs": ["src/**", "i18next-scanner.config.js"],
|
||||||
"outputs": ["public/locales/**"]
|
"outputs": ["public/locales/**"]
|
||||||
|
},
|
||||||
|
"format": {
|
||||||
|
"cache": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"globalEnv": [
|
"globalEnv": [
|
||||||
|
|
16
yarn.lock
16
yarn.lock
|
@ -12770,15 +12770,15 @@ prelude-ls@^1.2.1:
|
||||||
resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz"
|
resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz"
|
||||||
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
|
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
|
||||||
|
|
||||||
prettier-plugin-tailwindcss@^0.5.11:
|
prettier-plugin-tailwindcss@^0.6.8:
|
||||||
version "0.5.11"
|
version "0.6.8"
|
||||||
resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.11.tgz#1aa9308c3285b3cb7942aaeaec8d0e0775ac54d0"
|
resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.8.tgz#8a178e1679e3f941cc9de396f109c6cffea676d8"
|
||||||
integrity sha512-AvI/DNyMctyyxGOjyePgi/gqj5hJYClZ1avtQvLlqMT3uDZkRbi4HhGUpok3DRzv9z7Lti85Kdj3s3/1CeNI0w==
|
integrity sha512-dGu3kdm7SXPkiW4nzeWKCl3uoImdd5CTZEJGxyypEPL37Wj0HT2pLqjrvSei1nTeuQfO4PUfjeW5cTUNRLZ4sA==
|
||||||
|
|
||||||
prettier@^3.2.4:
|
prettier@^3.3.3:
|
||||||
version "3.2.4"
|
version "3.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.4.tgz#4723cadeac2ce7c9227de758e5ff9b14e075f283"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105"
|
||||||
integrity sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==
|
integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==
|
||||||
|
|
||||||
pretty-format@^3.8.0:
|
pretty-format@^3.8.0:
|
||||||
version "3.8.0"
|
version "3.8.0"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue