Skip to content

Commit

Permalink
chore: removes jsdoc & tailwindcss prettier plugins because eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed May 25, 2024
1 parent 1a02f3f commit 7e15ac6
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 24 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Authentication
CLERK_SECRET_KEY=<your-clerk-secret-key>
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<your-clerk-publishable-key>
# You don't need to change these, just copy them over into your `.env` file.
NEXT_PUBLIC_CLERK_SIGN_IN_URL='/sign-in'
NEXT_PUBLIC_CLERK_SIGN_UP_URL='/sign-up'
NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL='/app'
NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL='/app'

# Upstash Redis
UPSTASH_REDIS_REST_URL=<your-upstash-rest-url>
Expand Down
Binary file modified bun.lockb
Binary file not shown.
3 changes: 0 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ export default tseslint.config(

'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',

// prettier figures out the lines between tags
'jsdoc/tag-lines': 'off',
},
},
);
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"prettier-plugin-curly": "^0.2.1",
"prettier-plugin-jsdoc": "^1.3.0",
"prettier-plugin-packagejson": "^2.5.0",
"prettier-plugin-tailwindcss": "^0.5.14",
"rimraf": "^5.0.7",
"tailwindcss": "^3.4.3",
"tailwindcss-animate": "^1.0.7",
Expand Down
2 changes: 0 additions & 2 deletions prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ const config = {
printWidth: 80,
plugins: [
'@ianvs/prettier-plugin-sort-imports',
'prettier-plugin-tailwindcss',
'prettier-plugin-packagejson',
'prettier-plugin-curly',
'prettier-plugin-jsdoc',
],
importOrder: [
'',
Expand Down
1 change: 0 additions & 1 deletion src/app/(auth)/sign-in/[[...sign-in]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { SignIn } from '@clerk/nextjs';

/**
* The Signin page component.
*
* @returns The signin page.
*/
export default function Page() {
Expand Down
1 change: 0 additions & 1 deletion src/app/(auth)/sign-up/[[...sign-in]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { SignUp } from '@clerk/nextjs';

/**
* The Signup page component.
*
* @returns The signup page.
*/
export default function Page() {
Expand Down
1 change: 0 additions & 1 deletion src/app/(dashboard)/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { SignOutButton } from '@clerk/nextjs';

/**
* This is the main page for the dashboard.
*
* @returns A Next.js RSC page component.
*/
export default function DashboardHome() {
Expand Down
1 change: 0 additions & 1 deletion src/app/(marketing)/_components/home-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Image from 'next/image';
/**
* This component renders the dashboard preview image that is used on the home
* marketing page, it will use the light or dark image depending on the theme.
*
* @returns A react component representing the dashboard preview image.
*/
export function HomePreview() {
Expand Down
1 change: 0 additions & 1 deletion src/app/(marketing)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Navbar } from './_components/navbar';

/**
* The root layout component of the marketing group of pages.
*
* @param props The props of the layout.
* @param props.children The children of the layout which is every page in the
* marketing layout group.
Expand Down
5 changes: 3 additions & 2 deletions src/app/(marketing)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ import { HomePreview } from './_components/home-preview';

/**
* The marketing home page.
*
* @returns A react component representing the marketing home page.
*/
export default async function Home() {
const session = await currentUser();

if (session) redirect('/app');
if (session) {
redirect('/app');
}

return (
<main className="flex flex-col items-center justify-center gap-6 pt-24">
Expand Down
1 change: 0 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const metadata: Metadata = constructMetadata();

/**
* The root layout component of the application.
*
* @param props The props of the root layout.
* @param props.children The children of the root layout which is every page in
* the application.
Expand Down
1 change: 0 additions & 1 deletion src/app/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { constants } from '@/constants';
/**
* This function returns an object that represents the manifest.json file which
* next.js uses to create the manifest.json file.
*
* @returns The manifest.json file configuration.
*/
export default function manifest(): MetadataRoute.Manifest {
Expand Down
1 change: 0 additions & 1 deletion src/app/robots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { getBaseUrl } from '@/lib/utils';
/**
* This function returns an object that represents the robots.txt file which
* next.js uses to create the robots.txt file.
*
* @returns The robots.txt file configuration.
*/
export default function robots(): MetadataRoute.Robots {
Expand Down
13 changes: 7 additions & 6 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ import { env } from '@/env';
/**
* A utility function to merge Tailwind CSS classes using a combination of clsx
* and tailwind-merge.
*
* @example
* import { cn } from '@lib/utils';
*
* const classes = cn('text-black', 'bg-white', 'p-4');
*
* @param inputs - The classes to merge.
* @returns A string of the classes merged together.
*/
Expand All @@ -25,19 +23,22 @@ export function cn(...inputs: ClassValue[]) {

/**
* A utility function to get the base URL of the current instance.
*
* @returns The base URL.
*/
export function getBaseUrl() {
if (typeof window !== 'undefined') return window.location.origin;
if (process.env['VERCEL_URL']) return `https://${process.env['VERCEL_URL']}`;
if (typeof window !== 'undefined') {
return window.location.origin;
}

if (process.env['VERCEL_URL']) {
return `https://${process.env['VERCEL_URL']}`;
}
return `http://localhost:${String(env.PORT)}`;
}

/**
* A utility function to construct metadata for the application which can be
* used per page.
*
* @param params - The parameters for the metadata.
* @param params.title The title of the page.
* @param params.description The description of the page.
Expand Down
4 changes: 3 additions & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server';
const isProtectedRoute = createRouteMatcher(['/app(.*)']);

export default clerkMiddleware((auth, req) => {
if (isProtectedRoute(req)) auth().protect();
if (isProtectedRoute(req)) {
auth().protect();
}
});

export const config = {
Expand Down

0 comments on commit 7e15ac6

Please sign in to comment.