diff --git a/.eslintignore b/.eslintignore index 6c1ad4fee0..b529e32218 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,4 @@ -.tina/__generated__ +tina/__generated__ .next node_modules dist diff --git a/.eslintrc b/.eslintrc index 23904ab0e7..4f19cffbd8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -4,20 +4,27 @@ "plugins": ["@typescript-eslint", "tailwindcss"], "extends": [ "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", + "next/typescript", + "plugin:react/recommended", "plugin:tailwindcss/recommended", - "plugin:prettier/recommended", "next/core-web-vitals", + "plugin:prettier/recommended", ], "rules": { + "@typescript-eslint/no-unused-expressions": [ + "error", + { + "allowShortCircuit": true, + "allowTernary": true, + }, + ], "quotes": ["error", "double"], "no-console": "warn", "tailwindcss/no-arbitrary-value": "error", "tailwindcss/no-custom-classname": [ "error", { - "whitelist": ["g\\-yt.+", "legend"], + "whitelist": ["g\\-yt.+", "legend", "dark"], }, ], "prettier/prettier": [ diff --git a/.prettierignore b/.prettierignore index 5bb4753ef3..b7033220de 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,4 @@ -.tina/__generated__ +tina/__generated__ .next node_modules content diff --git a/.prettierrc b/.prettierrc index 428547dcef..1f1283b764 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,5 +3,6 @@ "singleQuote": false, "tabWidth": 2, "trailingComma": "es5", + "tailwindConfig": "./tailwind.config.js", "plugins": ["prettier-plugin-tailwindcss"] } diff --git a/app/articles/[filename]/page.tsx b/app/articles/[filename]/page.tsx index 1101bc1d35..ee7ac26259 100644 --- a/app/articles/[filename]/page.tsx +++ b/app/articles/[filename]/page.tsx @@ -15,7 +15,6 @@ const getData = async ( props: UseTinaProps & ArticlePageProps["props"]; }> => { const tinaProps = await getArticle(filename); - tinaProps.data.articlesIndex.title; return { props: { data: tinaProps.data, diff --git a/app/articles/index.tsx b/app/articles/index.tsx index ddbf2b2d27..d5c7d050bd 100644 --- a/app/articles/index.tsx +++ b/app/articles/index.tsx @@ -28,8 +28,6 @@ type ArticlesIndexPageProps = { function ArticlesIndexPage({ props, tinaProps }: ArticlesIndexPageProps) { const { data } = tinaProps; - data.articlesIndex; - data.articlesIndex.seo; const { dehydratedState } = props; return ( <> diff --git a/app/components/page-layout.tsx b/app/components/page-layout.tsx index 741f4fa5b2..b5ace91723 100644 --- a/app/components/page-layout.tsx +++ b/app/components/page-layout.tsx @@ -6,7 +6,7 @@ type PageLayoutProps = { }; const PageLayout = ({ children, megaMenu }: PageLayoutProps) => { return ( -
+
{megaMenu}
{children}