diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f3ef3f9..c330ae9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,7 +37,6 @@ jobs: - name: ✅ Cypress tests uses: cypress-io/github-action@1b70233146622b69e789ccdd4f9452adc638d25a with: - project: ./cypress browser: chrome build: pnpm build start: pnpm start diff --git a/.vscode/settings.json b/.vscode/settings.json index 24b93b2..5ee7137 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,6 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, "editor.tabSize": 2, - "python.terminal.activateEnvironment": false, // Tailwind CSS Autocomplete, add more if used in projects "tailwindCSS.classAttributes": [ diff --git a/.vscode/typescriptreact.code-snippets b/.vscode/typescriptreact.code-snippets deleted file mode 100644 index 1fce740..0000000 --- a/.vscode/typescriptreact.code-snippets +++ /dev/null @@ -1,193 +0,0 @@ -{ - //#region //*=========== React =========== - "import React": { - "prefix": "ir", - "body": ["import * as React from 'react';"] - }, - "React.useState": { - "prefix": "us", - "body": [ - "const [${1}, set${1/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}] = React.useState<$3>(${2:initial${1/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}})$0" - ] - }, - "React.useEffect": { - "prefix": "uf", - "body": ["React.useEffect(() => {", " $0", "}, []);"] - }, - "React.useReducer": { - "prefix": "ur", - "body": [ - "const [state, dispatch] = React.useReducer(${0:someReducer}, {", - " ", - "})" - ] - }, - "React.useRef": { - "prefix": "urf", - "body": ["const ${1:someRef} = React.useRef($0)"] - }, - "React Functional Component": { - "prefix": "rc", - "body": [ - "import * as React from 'react';\n", - "export default function ${1:${TM_FILENAME_BASE}}() {", - " return (", - "
", - " $0", - "
", - " )", - "}" - ] - }, - "React Functional Component with Props": { - "prefix": "rcp", - "body": [ - "import * as React from 'react';\n", - "import clsxm from '@/lib/clsxm';\n", - "type ${1:${TM_FILENAME_BASE}}Props= {\n", - "} & React.ComponentPropsWithoutRef<'div'>\n", - "export default function ${1:${TM_FILENAME_BASE}}({className, ...rest}: ${1:${TM_FILENAME_BASE}}Props) {", - " return (", - "
", - " $0", - "
", - " )", - "}" - ] - }, - //#endregion //*======== React =========== - - //#region //*=========== Commons =========== - "Region": { - "prefix": "reg", - "scope": "javascript, typescript, javascriptreact, typescriptreact", - "body": [ - "//#region //*=========== ${1} ===========", - "${TM_SELECTED_TEXT}$0", - "//#endregion //*======== ${1} ===========" - ] - }, - "Region CSS": { - "prefix": "regc", - "scope": "css, scss", - "body": [ - "/* #region /**=========== ${1} =========== */", - "${TM_SELECTED_TEXT}$0", - "/* #endregion /**======== ${1} =========== */" - ] - }, - //#endregion //*======== Commons =========== - - //#region //*=========== Next.js =========== - "Next Pages": { - "prefix": "np", - "body": [ - "import * as React from 'react';\n", - "import Layout from '@/components/layout/Layout';", - "import Seo from '@/components/Seo';\n", - "export default function ${1:${TM_FILENAME_BASE/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}}Page() {", - " return (", - " ", - " \n", - "
\n", - "
", - "
", - " $0", - "
", - "
", - "
", - "
", - " )", - "}" - ] - }, - "Next API": { - "prefix": "napi", - "body": [ - "import { NextApiRequest, NextApiResponse } from 'next';\n", - "export default async function handler(req: NextApiRequest, res: NextApiResponse) {", - " if (req.method === 'GET') {", - " res.status(200).json({ name: 'Bambang' });", - " } else {", - " res.status(405).json({ message: 'Method Not Allowed' });", - " }", - "}" - ] - }, - "Get Static Props": { - "prefix": "gsp", - "body": [ - "export const getStaticProps = async (context: GetStaticPropsContext) => {", - " return {", - " props: {}", - " };", - "}" - ] - }, - "Get Static Paths": { - "prefix": "gspa", - "body": [ - "export const getStaticPaths: GetStaticPaths = async () => {", - " return {", - " paths: [", - " { params: { $1 }}", - " ],", - " fallback: ", - " };", - "}" - ] - }, - "Get Server Side Props": { - "prefix": "gssp", - "body": [ - "export const getServerSideProps = async (context: GetServerSidePropsContext) => {", - " return {", - " props: {}", - " };", - "}" - ] - }, - "Infer Get Static Props": { - "prefix": "igsp", - "body": "InferGetStaticPropsType" - }, - "Infer Get Server Side Props": { - "prefix": "igssp", - "body": "InferGetServerSidePropsType" - }, - "Import useRouter": { - "prefix": "imust", - "body": ["import { useRouter } from 'next/router';"] - }, - "Import Next Image": { - "prefix": "imimg", - "body": ["import Image from 'next/image';"] - }, - "Import Next Link": { - "prefix": "iml", - "body": ["import Link from 'next/link';"] - }, - //#endregion //*======== Next.js =========== - - //#region //*=========== Snippet Wrap =========== - "Wrap with Fragment": { - "prefix": "ff", - "body": ["<>", "\t${TM_SELECTED_TEXT}", ""] - }, - "Wrap with clsx": { - "prefix": "cx", - "body": ["{clsx([${TM_SELECTED_TEXT}$0])}"] - }, - "Wrap with clsxm": { - "prefix": "cxm", - "body": ["{clsxm([${TM_SELECTED_TEXT}$0, className])}"] - }, - //#endregion //*======== Snippet Wrap =========== - - "Logger": { - "prefix": "lg", - "body": [ - "logger({ ${1:${CLIPBOARD}} }, '${TM_FILENAME} line ${TM_LINE_NUMBER}')" - ] - } -} diff --git a/tsconfig.json b/tsconfig.json index e59724b..4b8fa2e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,13 +15,13 @@ "incremental": true, "plugins": [ { - "name": "next" - } + "name": "next", + }, ], "paths": { - "@/*": ["./src/*"] - } + "@/*": ["./src/*"], + }, }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], }