Skip to content

Commit a74019b

Browse files
committed
renaming the format and prettier scripts
1 parent 785e454 commit a74019b

28 files changed

+312
-381
lines changed

.eslintrc.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2023": true
5+
},
6+
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:react-hooks/recommended"],
7+
"parserOptions": {
8+
"ecmaVersion": 2023,
9+
"sourceType": "module",
10+
"ecmaFeatures": {
11+
"jsx": true
12+
}
13+
},
14+
"plugins": ["react", "react-hooks"],
15+
"rules": {
16+
"no-unused-vars": "error",
17+
"react/react-in-jsx-scope": "off",
18+
"react/jsx-uses-react": "off",
19+
"react/prop-types": "off",
20+
"no-undef": "off"
21+
},
22+
"settings": {
23+
"react": {
24+
"version": "detect"
25+
}
26+
}
27+
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@
7575
},
7676
"minimum-stability": "dev",
7777
"prefer-stable": true
78-
}
78+
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"build:ssr": "vite build && vite build --ssr",
77
"dev": "vite",
88
"prepare": "husky install",
9-
"lint": "prettier --write .",
10-
"test:lint": "prettier --check .",
11-
"test:types": "./node_modules/.bin/eslint resources/js --ext .js,.jsx"
9+
"format": "prettier --write .",
10+
"format:check": "prettier --check .",
11+
"lint": "eslint resources/js --ext .ts,.tsx"
1212
},
1313
"devDependencies": {
1414
"@inertiajs/react": "^2.0.0",
@@ -52,4 +52,4 @@
5252
"tailwind-merge": "^2.5.5",
5353
"tailwindcss-animate": "^1.0.7"
5454
}
55-
}
55+
}

resources/js/components/app-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function AppContent({ variant = 'header', children, ...props }: AppConten
1111
}
1212

1313
return (
14-
<main className="flex h-full flex-1 flex-col gap-4 rounded-xl max-w-7xl mx-auto w-full" {...props}>
14+
<main className="mx-auto flex h-full w-full max-w-7xl flex-1 flex-col gap-4 rounded-xl" {...props}>
1515
{children}
1616
</main>
1717
);

resources/js/components/app-header.tsx

Lines changed: 129 additions & 143 deletions
Large diffs are not rendered by default.

resources/js/components/app-logo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export default function AppLogo(props: SVGAttributes<SVGElement>) {
88
<AppLogoIcon className="size-5 fill-current text-white dark:text-black" />
99
</div>
1010
<div className="grid flex-1 text-left text-sm leading-tight">
11-
<span className="truncate mb-0.5 font-semibold leading-none">Laravel</span>
12-
<span className="truncate text-[11px] tracking-tight opacity-80 leading-none">Starter Kit</span>
11+
<span className="mb-0.5 truncate font-semibold leading-none">Laravel</span>
12+
<span className="truncate text-[11px] leading-none tracking-tight opacity-80">Starter Kit</span>
1313
</div>
1414
</>
1515
);

resources/js/components/app-shell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function AppShell({ children, variant = 'header' }: AppShellProps) {
1717
};
1818

1919
if (variant === 'header') {
20-
return <div className="flex flex-col min-h-screen w-full">{children}</div>;
20+
return <div className="flex min-h-screen w-full flex-col">{children}</div>;
2121
}
2222

2323
return (

resources/js/components/app-sidebar-header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { SidebarTrigger } from '@/components/ui/sidebar';
21
import { Breadcrumbs } from '@/components/breadcrumbs';
2+
import { SidebarTrigger } from '@/components/ui/sidebar';
33
import { type BreadcrumbItem as BreadcrumbItemType } from '@/types';
44

55
export function AppSidebarHeader({ breadcrumbs = [] }: { breadcrumbs?: BreadcrumbItemType[] }) {
66
return (
7-
<header className="flex h-16 shrink-0 items-center gap-2 px-4 border-b border-sidebar-border/50 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12">
7+
<header className="flex h-16 shrink-0 items-center gap-2 border-b border-sidebar-border/50 px-4 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12">
88
<div className="flex items-center gap-2">
99
<SidebarTrigger className="-ml-1" />
1010
<Breadcrumbs breadcrumbs={breadcrumbs} />

resources/js/components/breadcrumbs.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from '@/components/ui/breadcrumb';
2-
import { Link } from '@inertiajs/react';
32
import { type BreadcrumbItem as BreadcrumbItemType } from '@/types';
43
import { Fragment } from 'react';
54

65
export function Breadcrumbs({ breadcrumbs }: { breadcrumbs: BreadcrumbItemType[] }) {
76
return (
87
<>
9-
108
{breadcrumbs.length > 0 && (
119
<Breadcrumb>
1210
<BreadcrumbList>

resources/js/components/delete-user.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@ import { Label } from '@/components/ui/label';
99

1010
import HeadingSmall from '@/components/heading-small';
1111

12-
import {
13-
Dialog,
14-
DialogClose,
15-
DialogContent,
16-
DialogDescription,
17-
DialogFooter,
18-
DialogHeader,
19-
DialogTitle,
20-
DialogTrigger,
21-
} from '@/components/ui/dialog';
12+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogTitle, DialogTrigger } from '@/components/ui/dialog';
2213

2314
export default function DeleteUser() {
2415
const passwordInput = useRef<HTMLInputElement>(null);
@@ -51,8 +42,8 @@ export default function DeleteUser() {
5142
<DialogContent>
5243
<DialogTitle>Are you sure you want to delete your account?</DialogTitle>
5344
<DialogDescription>
54-
Once your account is deleted, all of its resources and data will also be permanently deleted. Please enter your
55-
password to confirm you would like to permanently delete your account.
45+
Once your account is deleted, all of its resources and data will also be permanently deleted. Please enter your password
46+
to confirm you would like to permanently delete your account.
5647
</DialogDescription>
5748
<form className="space-y-6" onSubmit={deleteUser}>
5849
<div className="grid gap-2">

0 commit comments

Comments
 (0)