Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/fix linting issues #15

Merged
merged 3 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Indie Creators HQ",
"scripts": {
"build": "pnpm with-env next build",
"clean": "git clean -xdf .next .turbo node_modules",
"clean": "git clean -xdf .next .turbo node_modules dist",
"dev": "pnpm with-env next dev",
"lint": "dotenv -v SKIP_ENV_VALIDATION=1 next lint",
"lint:fix": "pnpm lint --fix",
Expand Down Expand Up @@ -38,7 +38,7 @@
"dotenv-cli": "^7.2.1",
"eslint": "^8.38.0",
"postcss": "^8.4.22",
"tailwindcss": "^3.4.10",
"tailwindcss": "^3.4.12",
"typescript": "^5.0.4"
}
}
12 changes: 7 additions & 5 deletions apps/nextjs/src/common/utils/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/**
* isNullOrUndefined
* @description - validate if an element is null or undefined
* isNullOrUndefined.
*
* - validate if an element is null or undefined.
*
* @function
* @param {any} value - Element to validate
* @return {boolean} Element is null or undefined.
* @param {any} value - Element to validate.
* @returns {boolean} Element is null or undefined.
*/
export const isNullOrUndefined = (value: any): boolean => value === undefined || value === null;
export const isNullOrUndefined = (value: unknown): boolean => value === undefined || value === null;
2 changes: 1 addition & 1 deletion apps/nextjs/src/pages/auth/signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Signin: NextPage = () => {
<div className="relative flex flex-col items-center justify-center rounded-lg bg-slate-800 p-10">
<button
className="relative flex min-w-fit items-center justify-center overflow-hidden whitespace-nowrap rounded-lg bg-primary-200/20 px-4 py-2 text-center text-sm font-semibold text-primary-50 transition duration-100 ease-out hover:bg-primary-200/30"
onClick={() => signIn('twitter')}
onClick={() => void signIn('twitter')}
>
Log in with Twitter
</button>
Expand Down
17 changes: 4 additions & 13 deletions apps/nextjs/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { NextPage } from 'next';
import Head from 'next/head';
import Link from 'next/link';
import { Icon, IconCatalog } from '~/components';
import { signIn, useSession } from 'next-auth/react';
import { Button, ButtonSize, ButtonVariant } from 'side-ui';
import { Icon, IconCatalog } from '~/components';

const Home: NextPage = () => {
const { data: sessionData } = useSession();
Expand All @@ -18,26 +18,17 @@ const Home: NextPage = () => {
<main className="relative flex h-screen w-full flex-none flex-col items-center justify-center gap-10 overflow-hidden bg-slate-900 p-10">
<div className="relative flex h-min w-min flex-none flex-col flex-wrap items-center justify-center gap-4 overflow-hidden p-0">
<div className="mb-2 flex flex-row items-center gap-4 text-white">
<a
className="text-2xl font-semibold text-secondary-300 transition hover:opacity-80"
href="/"
>
<a className="text-2xl font-semibold text-secondary-300 transition hover:opacity-80" href="/">
Side Project Starter Kit
</a>
</div>
<div className="mb-4 w-96">
<h1 className="text-center text-3xl font-bold text-slate-50">
This is a starter kit template
</h1>
<h1 className="text-center text-3xl font-bold text-slate-50">This is a starter kit template</h1>
</div>
{sessionData ? (
<p className="text-lg text-white">{sessionData.user.name}</p>
) : (
<Button
variant={ButtonVariant.secondary}
size={ButtonSize.sm}
onClick={() => signIn('twitter')}
>
<Button variant={ButtonVariant.secondary} size={ButtonSize.sm} onClick={() => void signIn('twitter')}>
Log in with Twitter
</Button>
)}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"packageManager": "[email protected]",
"scripts": {
"build": "turbo build",
"clean": "git clean -xdf node_modules",
"clean": "git clean -xdf .turbo node_modules dist",
"clean:workspaces": "turbo clean",
"db:docker:startup": "docker compose --profile db up -d",
"db:docker:shutdown": "docker compose --profile db down",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"author": "Indie Creators HQ",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"clean": "git clean -xdf .next .turbo node_modules dist",
"lint": "eslint .",
"lint:fix": "pnpm lint --fix",
"type-check": "tsc --noEmit"
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"author": "Indie Creators HQ",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"clean": "git clean -xdf .next .turbo node_modules dist",
"lint": "eslint .",
"lint:fix": "pnpm lint --fix",
"type-check": "tsc --noEmit"
Expand Down
3 changes: 3 additions & 0 deletions packages/config/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"main": "index.js",
"license": "MIT",
"author": "Indie Creators HQ",
"scripts": {
"clean": "git clean -xdf .next .turbo node_modules dist"
},
"dependencies": {
"@types/eslint": "^8.37.0",
"@typescript-eslint/eslint-plugin": "^5.59.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"author": "Indie Creators HQ",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"clean": "git clean -xdf .next .turbo node_modules dist",
"db:generate": "pnpm with-env prisma generate",
"db:push": "pnpm with-env prisma db push --skip-generate --accept-data-loss",
"db:migrate": "pnpm with-env prisma migrate dev",
Expand Down
30 changes: 8 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading