Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: eslints

Andras Bacsaic39058bc07eb
diff --git a/apps/designer/app/routes/rest/pages.$projectId.ts b/apps/designer/app/routes/rest/pages.$projectId.ts
index e3493e27c4..3c200eb1b6 100644
--- a/apps/designer/app/routes/rest/pages.$projectId.ts
+++ b/apps/designer/app/routes/rest/pages.$projectId.ts
@@ -13,8 +13,8 @@ import { type FetcherData, makeFieldError } from "~/shared/form-utils";
const nonEmptyString = z
.string({
- invalid_type_error: "Can't be empty", // eslint-disable-line
- required_error: "Can't be empty", // eslint-disable-line
+ invalid_type_error: "Can't be empty", // eslint-disable-line camelcase
+ required_error: "Can't be empty", // eslint-disable-line camelcase
})
.transform((value) => value.trim())
.refine((value) => value !== "", "Can't be empty");
diff --git a/packages/design-system/src/components/__DEPRECATED__/text.tsx b/packages/design-system/src/components/__DEPRECATED__/text.tsx
index 974d7e99ab..0f059b55e4 100644
--- a/packages/design-system/src/components/__DEPRECATED__/text.tsx
+++ b/packages/design-system/src/components/__DEPRECATED__/text.tsx
@@ -1,6 +1,6 @@
import { styled } from "../../stitches.config";
-export const DEPRECATEDText = styled("div", {
+export const DeprecatedText = styled("div", {
// Reset
lineHeight: "1",
margin: "0",
diff --git a/packages/design-system/src/components/heading.tsx b/packages/design-system/src/components/heading.tsx
index c7eab203cf..b6f621f15c 100644
--- a/packages/design-system/src/components/heading.tsx
+++ b/packages/design-system/src/components/heading.tsx
@@ -1,14 +1,14 @@
import React from "react";
-import { DEPRECATEDText } from "./__DEPRECATED__/text";
+import { DeprecatedText } from "./__DEPRECATED__/text";
import { VariantProps, CSS } from "../stitches.config";
import merge from "lodash.merge";
const DEFAULT_TAG = "h1";
-type TextSizeVariants = Pick<VariantProps<typeof DEPRECATEDText>, "size">;
+type TextSizeVariants = Pick<VariantProps<typeof DeprecatedText>, "size">;
type HeadingSizeVariants = "1" | "2" | "3" | "4";
type HeadingVariants = { size?: HeadingSizeVariants } & Omit<
- VariantProps<typeof DEPRECATEDText>,
+ VariantProps<typeof DeprecatedText>,
"size"
>;
type HeadingProps = React.ComponentProps<typeof DEFAULT_TAG> &
@@ -41,7 +41,7 @@ export const Heading = React.forwardRef<
};
return (
- <DEPRECATEDText
+ <DeprecatedText
as={DEFAULT_TAG}
{...textProps}
ref={forwardedRef}
diff --git a/packages/design-system/src/components/link.tsx b/packages/design-system/src/components/link.tsx
index 0c4ce9b5eb..2638d5c689 100644
--- a/packages/design-system/src/components/link.tsx
+++ b/packages/design-system/src/components/link.tsx
@@ -1,5 +1,5 @@
import { styled } from "../stitches.config";
-import { DEPRECATEDText } from "./__DEPRECATED__/text";
+import { DeprecatedText } from "./__DEPRECATED__/text";
export const Link = styled("a", {
alignItems: "center",
@@ -22,7 +22,7 @@ export const Link = styled("a", {
outlineOffset: "2px",
textDecorationLine: "none",
},
- [`& ${DEPRECATEDText}`]: {
+ [`& ${DeprecatedText}`]: {
color: "inherit",
},
variants: {