From 5c295ffafa5b9ee9d69c9bf696313433b763a5d1 Mon Sep 17 00:00:00 2001 From: Refringe Date: Tue, 14 May 2024 22:15:20 -0400 Subject: [PATCH] Adds Prettier Formatting --- .prettierrc | 1 + package-lock.json | 91 +++++++++++++++++++++++++++++++++++++++ package.json | 2 + resources/js/bootstrap.js | 6 +-- routes/web.php | 6 +-- 5 files changed, 98 insertions(+), 8 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{} diff --git a/package-lock.json b/package-lock.json index 7d18283..1370ce5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,8 @@ "axios": "^1.6.4", "laravel-vite-plugin": "^1.0", "postcss": "^8.4.32", + "prettier": "^3.2.5", + "prettier-plugin-tailwindcss": "^0.5.14", "tailwindcss": "^3.4.0", "vite": "^5.0" } @@ -1850,6 +1852,95 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.5.14", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.14.tgz", + "integrity": "sha512-Puaz+wPUAhFp8Lo9HuciYKM2Y2XExESjeT+9NQoVFXZsPPnc9VYss2SpxdQ6vbatmt8/4+SN0oe0I1cPDABg9Q==", + "dev": true, + "engines": { + "node": ">=14.21.3" + }, + "peerDependencies": { + "@ianvs/prettier-plugin-sort-imports": "*", + "@prettier/plugin-pug": "*", + "@shopify/prettier-plugin-liquid": "*", + "@trivago/prettier-plugin-sort-imports": "*", + "@zackad/prettier-plugin-twig-melody": "*", + "prettier": "^3.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-import-sort": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", + "prettier-plugin-organize-attributes": "*", + "prettier-plugin-organize-imports": "*", + "prettier-plugin-sort-imports": "*", + "prettier-plugin-style-order": "*", + "prettier-plugin-svelte": "*" + }, + "peerDependenciesMeta": { + "@ianvs/prettier-plugin-sort-imports": { + "optional": true + }, + "@prettier/plugin-pug": { + "optional": true + }, + "@shopify/prettier-plugin-liquid": { + "optional": true + }, + "@trivago/prettier-plugin-sort-imports": { + "optional": true + }, + "@zackad/prettier-plugin-twig-melody": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + }, + "prettier-plugin-css-order": { + "optional": true + }, + "prettier-plugin-import-sort": { + "optional": true + }, + "prettier-plugin-jsdoc": { + "optional": true + }, + "prettier-plugin-marko": { + "optional": true + }, + "prettier-plugin-organize-attributes": { + "optional": true + }, + "prettier-plugin-organize-imports": { + "optional": true + }, + "prettier-plugin-sort-imports": { + "optional": true + }, + "prettier-plugin-style-order": { + "optional": true + }, + "prettier-plugin-svelte": { + "optional": true + } + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", diff --git a/package.json b/package.json index 3975baa..c0e36c0 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,8 @@ "axios": "^1.6.4", "laravel-vite-plugin": "^1.0", "postcss": "^8.4.32", + "prettier": "^3.2.5", + "prettier-plugin-tailwindcss": "^0.5.14", "tailwindcss": "^3.4.0", "vite": "^5.0" } diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index 5f1390b..f63c129 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -1,4 +1,4 @@ -import axios from 'axios'; -window.axios = axios; +import axios from "axios"; -window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; +window.axios = axios; +window.axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest"; diff --git a/routes/web.php b/routes/web.php index 0b90255..419a555 100644 --- a/routes/web.php +++ b/routes/web.php @@ -6,11 +6,7 @@ Route::get('/', function () { return view('welcome'); }); -Route::middleware([ - 'auth:sanctum', - config('jetstream.auth_session'), - 'verified', -])->group(function () { +Route::middleware(['auth:sanctum', config('jetstream.auth_session'), 'verified'])->group(function () { Route::get('/dashboard', function () { return view('dashboard'); })->name('dashboard');