mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-11 09:51:47 +00:00
feature: add prettier config (#452)
* chore: fix dashboard readme * feat: add prettier config * chore: update Node version requirement to 18.17.0 * Remove extra space * Update @tailwind/forms * Testing --------- Co-authored-by: mohamed.elzanaty3 <mohamed.elzanaty3@vodafone.com> Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com> Co-authored-by: Delba de Oliveira <delbabrown@gmail.com>
This commit is contained in:
committed by
GitHub
parent
32607c93c9
commit
9874174ed4
@@ -25,7 +25,7 @@ export default async function RevenueChart() {
|
|||||||
Recent Revenue
|
Recent Revenue
|
||||||
</h2>
|
</h2>
|
||||||
<div className="rounded-xl bg-gray-50 p-4">
|
<div className="rounded-xl bg-gray-50 p-4">
|
||||||
<div className="sm:grid-cols-13 mt-0 grid grid-cols-12 items-end gap-2 rounded-md bg-white p-4 md:gap-4">
|
<div className="mt-0 grid grid-cols-12 items-end gap-2 rounded-md bg-white p-4 sm:grid-cols-13 md:gap-4">
|
||||||
{/* y-axis */}
|
{/* y-axis */}
|
||||||
<div
|
<div
|
||||||
className="mb-6 hidden flex-col justify-between text-sm text-gray-400 sm:flex"
|
className="mb-6 hidden flex-col justify-between text-sm text-gray-400 sm:flex"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function RevenueChartSkeleton() {
|
|||||||
<div className={`${shimmer} relative w-full overflow-hidden md:col-span-4`}>
|
<div className={`${shimmer} relative w-full overflow-hidden md:col-span-4`}>
|
||||||
<div className="mb-4 h-8 w-36 rounded-md bg-gray-100" />
|
<div className="mb-4 h-8 w-36 rounded-md bg-gray-100" />
|
||||||
<div className="rounded-xl bg-gray-100 p-4">
|
<div className="rounded-xl bg-gray-100 p-4">
|
||||||
<div className="sm:grid-cols-13 mt-0 grid h-[410px] grid-cols-12 items-end gap-2 rounded-md bg-white p-4 md:gap-4" />
|
<div className="mt-0 grid h-[410px] grid-cols-12 items-end gap-2 rounded-md bg-white p-4 sm:grid-cols-13 md:gap-4" />
|
||||||
<div className="flex items-center pb-2 pt-6">
|
<div className="flex items-center pb-2 pt-6">
|
||||||
<div className="h-5 w-5 rounded-full bg-gray-200" />
|
<div className="h-5 w-5 rounded-full bg-gray-200" />
|
||||||
<div className="ml-2 h-4 w-20 rounded-md bg-gray-200" />
|
<div className="ml-2 h-4 w-20 rounded-md bg-gray-200" />
|
||||||
|
|||||||
2456
dashboard/final-example/package-lock.json
generated
2456
dashboard/final-example/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,12 +4,14 @@
|
|||||||
"build": "next build",
|
"build": "next build",
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
|
"prettier": "prettier --write --ignore-unknown .",
|
||||||
|
"prettier:check": "prettier --check --ignore-unknown .",
|
||||||
"seed": "node -r dotenv/config ./scripts/seed.js",
|
"seed": "node -r dotenv/config ./scripts/seed.js",
|
||||||
"start": "next start"
|
"start": "next start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@heroicons/react": "^2.0.18",
|
"@heroicons/react": "^2.0.18",
|
||||||
"@tailwindcss/forms": "^0.5.6",
|
"@tailwindcss/forms": "^0.5.7",
|
||||||
"@types/node": "20.5.7",
|
"@types/node": "20.5.7",
|
||||||
"@vercel/postgres": "^0.5.0",
|
"@vercel/postgres": "^0.5.0",
|
||||||
"autoprefixer": "10.4.15",
|
"autoprefixer": "10.4.15",
|
||||||
@@ -29,10 +31,13 @@
|
|||||||
"@types/bcrypt": "^5.0.1",
|
"@types/bcrypt": "^5.0.1",
|
||||||
"@types/react": "18.2.21",
|
"@types/react": "18.2.21",
|
||||||
"@types/react-dom": "18.2.14",
|
"@types/react-dom": "18.2.14",
|
||||||
|
"@vercel/style-guide": "^5.0.1",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"eslint": "^8.52.0",
|
"eslint": "^8.52.0",
|
||||||
"eslint-config-next": "^14.0.0",
|
"eslint-config-next": "^14.0.0",
|
||||||
"prettier": "^3.0.3"
|
"eslint-config-prettier": "9.0.0",
|
||||||
|
"prettier": "^3.0.3",
|
||||||
|
"prettier-plugin-tailwindcss": "0.5.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.17.0"
|
"node": ">=18.17.0"
|
||||||
|
|||||||
6
dashboard/final-example/prettier.config.js
Normal file
6
dashboard/final-example/prettier.config.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
const styleguide = require('@vercel/style-guide/prettier');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
...styleguide,
|
||||||
|
plugins: [...styleguide.plugins, 'prettier-plugin-tailwindcss'],
|
||||||
|
};
|
||||||
@@ -27,7 +27,6 @@ const config: Config = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [require('@tailwindcss/forms')],
|
plugins: [require('@tailwindcss/forms')],
|
||||||
};
|
};
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function RevenueChartSkeleton() {
|
|||||||
<div className={`${shimmer} relative w-full overflow-hidden md:col-span-4`}>
|
<div className={`${shimmer} relative w-full overflow-hidden md:col-span-4`}>
|
||||||
<div className="mb-4 h-8 w-36 rounded-md bg-gray-100" />
|
<div className="mb-4 h-8 w-36 rounded-md bg-gray-100" />
|
||||||
<div className="rounded-xl bg-gray-100 p-4">
|
<div className="rounded-xl bg-gray-100 p-4">
|
||||||
<div className="sm:grid-cols-13 mt-0 grid h-[410px] grid-cols-12 items-end gap-2 rounded-md bg-white p-4 md:gap-4" />
|
<div className="mt-0 grid h-[410px] grid-cols-12 items-end gap-2 rounded-md bg-white p-4 sm:grid-cols-13 md:gap-4" />
|
||||||
<div className="flex items-center pb-2 pt-6">
|
<div className="flex items-center pb-2 pt-6">
|
||||||
<div className="h-5 w-5 rounded-full bg-gray-200" />
|
<div className="h-5 w-5 rounded-full bg-gray-200" />
|
||||||
<div className="ml-2 h-4 w-20 rounded-md bg-gray-200" />
|
<div className="ml-2 h-4 w-20 rounded-md bg-gray-200" />
|
||||||
|
|||||||
2456
dashboard/starter-example/package-lock.json
generated
2456
dashboard/starter-example/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -3,11 +3,13 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
"prettier": "prettier --write --ignore-unknown .",
|
||||||
|
"prettier:check": "prettier --check --ignore-unknown .",
|
||||||
"start": "next start"
|
"start": "next start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@heroicons/react": "^2.0.18",
|
"@heroicons/react": "^2.0.18",
|
||||||
"@tailwindcss/forms": "^0.5.6",
|
"@tailwindcss/forms": "^0.5.7",
|
||||||
"@types/node": "20.5.7",
|
"@types/node": "20.5.7",
|
||||||
"@vercel/postgres": "^0.5.0",
|
"@vercel/postgres": "^0.5.0",
|
||||||
"autoprefixer": "10.4.15",
|
"autoprefixer": "10.4.15",
|
||||||
@@ -25,10 +27,13 @@
|
|||||||
"@types/bcrypt": "^5.0.1",
|
"@types/bcrypt": "^5.0.1",
|
||||||
"@types/react": "18.2.21",
|
"@types/react": "18.2.21",
|
||||||
"@types/react-dom": "18.2.14",
|
"@types/react-dom": "18.2.14",
|
||||||
|
"@vercel/style-guide": "^5.0.1",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"eslint": "^8.52.0",
|
"eslint": "^8.52.0",
|
||||||
"eslint-config-next": "^14.0.0",
|
"eslint-config-next": "^14.0.0",
|
||||||
"prettier": "^3.0.3"
|
"eslint-config-prettier": "9.0.0",
|
||||||
|
"prettier": "^3.0.3",
|
||||||
|
"prettier-plugin-tailwindcss": "0.5.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.17.0"
|
"node": ">=18.17.0"
|
||||||
|
|||||||
6
dashboard/starter-example/prettier.config.js
Normal file
6
dashboard/starter-example/prettier.config.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
const styleguide = require('@vercel/style-guide/prettier');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
...styleguide,
|
||||||
|
plugins: [...styleguide.plugins, 'prettier-plugin-tailwindcss'],
|
||||||
|
};
|
||||||
@@ -27,7 +27,6 @@ const config: Config = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [require('@tailwindcss/forms')],
|
plugins: [require('@tailwindcss/forms')],
|
||||||
};
|
};
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"test": "npm run lint && npm run prettier:check"
|
"test": "npm run lint && npm run prettier:check"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@tailwindcss/forms": "^0.5.7",
|
||||||
"next": "^14.0.0"
|
"next": "^14.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
12
pnpm-lock.yaml
generated
12
pnpm-lock.yaml
generated
@@ -8,6 +8,9 @@ importers:
|
|||||||
|
|
||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@tailwindcss/forms':
|
||||||
|
specifier: ^0.5.7
|
||||||
|
version: 0.5.7(tailwindcss@3.3.3)
|
||||||
next:
|
next:
|
||||||
specifier: ^14.0.0
|
specifier: ^14.0.0
|
||||||
version: 14.0.0(@babel/core@7.23.0)(react-dom@18.2.0)(react@18.2.0)
|
version: 14.0.0(@babel/core@7.23.0)(react-dom@18.2.0)(react@18.2.0)
|
||||||
@@ -1036,6 +1039,15 @@ packages:
|
|||||||
tailwindcss: 3.3.3
|
tailwindcss: 3.3.3
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/@tailwindcss/forms@0.5.7(tailwindcss@3.3.3):
|
||||||
|
resolution: {integrity: sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==}
|
||||||
|
peerDependencies:
|
||||||
|
tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1'
|
||||||
|
dependencies:
|
||||||
|
mini-svg-data-uri: 1.4.4
|
||||||
|
tailwindcss: 3.3.3
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@types/bcrypt@5.0.1:
|
/@types/bcrypt@5.0.1:
|
||||||
resolution: {integrity: sha512-dIIrEsLV1/v0AUNI8oHMaRRTSeVjoy5ID8oclJavtPj8CwPJoD1eFoNXEypuu6k091brEzBeOo3LlxeAH9zRZg==}
|
resolution: {integrity: sha512-dIIrEsLV1/v0AUNI8oHMaRRTSeVjoy5ID8oclJavtPj8CwPJoD1eFoNXEypuu6k091brEzBeOo3LlxeAH9zRZg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
Reference in New Issue
Block a user