From 9b68f4939539937ba4f31df6bcc3bdf94de9a205 Mon Sep 17 00:00:00 2001 From: Mark Linn Date: Sun, 27 Aug 2023 14:57:02 +0200 Subject: [PATCH] chore: updat eslint rules + add font style --- .eslintrc.json | 33 ++++++++++++++++++++++++++++++++- .github/workflows/preview.yml | 2 -- .prettierignore | 3 ++- src/app/layout.tsx | 10 +++++++++- 4 files changed, 43 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index a6b416cc..99754607 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -38,6 +38,37 @@ "react/destructuring-assignment": [2, "always"], "react/button-has-type": 2, "react/no-array-index-key": 2, - "import/order": 2 + "import/order": 2, + "semi": [2, "always"], + "quotes": [2, "double"], + "prefer-destructuring": [ + 2, + { + "VariableDeclarator": { + "array": false, + "object": true + }, + "AssignmentExpression": { + "array": true, + "object": false + } + }, + { + "enforceForRenamedProperties": false + } + ], + "object-curly-spacing": [2, "always"], + "arrow-body-style": [2, "as-needed"], + "arrow-parens": [2, "always"], + "space-infix-ops": 2, + "arrow-spacing": [2, { "before": true, "after": true }], + "no-unused-vars": [2, { "args": "all", "argsIgnorePattern": "_" }], + "guard-for-in": 2, + "no-await-in-loop": 2, + "indent": [2, 2], + "object-curly-newline": [2, { "minProperties": 4, "consistent": true }], + "brace-style": 2, + "no-multiple-empty-lines": 2, + "eol-last": [2, "always"] } } diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 58171d93..e6cf6ee5 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -27,5 +27,3 @@ jobs: message: | Preview URL ${{ steps.preview-deploy.outputs.URL }} comment_tag: execution - - diff --git a/.prettierignore b/.prettierignore index 754f921a..65dda725 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,4 +8,5 @@ coverage **/out/* next-env.d.ts next.config.js -*.md \ No newline at end of file +*.md +.github/** \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 8264fada..46ada53c 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,5 +1,6 @@ import "./globals.css"; import type { Metadata } from "next"; +import { Inter } from "next/font/google"; import { StoreProvider } from "@/components"; export const metadata: Metadata = { @@ -7,13 +8,20 @@ export const metadata: Metadata = { description: "Generated by create next app", }; +// If loading a variable font, you don't need to specify the font weight +const inter = Inter({ + weight: ["400", "500", "600", "700"], + subsets: ["latin"], + display: "swap", +}); + export default function RootLayout({ children, }: { children: React.ReactNode; }) { return ( - + {children}