Skip to content

Commit

Permalink
feat: add tailwind prettier plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
avneesh0612 committed Jan 25, 2022
1 parent e4380c1 commit d910e6e
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 44 deletions.
2 changes: 1 addition & 1 deletion components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FC } from "react";

const Footer: FC = () => {
return (
<footer className="flex items-center justify-center w-full h-24 border-t">
<footer className="flex h-24 w-full items-center justify-center border-t">
<a
className="flex items-center justify-center"
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react-dom": "^17.0.2"
},
"devDependencies": {
"@commitlint/cli": "^16.0.2",
"@commitlint/cli": "^16.1.0",
"@commitlint/config-conventional": "^16.0.0",
"@types/react": "^17.0.38",
"autoprefixer": "^10.4.2",
Expand All @@ -32,13 +32,14 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-tailwind": "^0.2.1",
"eslint-plugin-tailwindcss": "^3.2.0",
"eslint-plugin-tailwindcss": "^3.3.2",
"husky": "^7.0.4",
"postcss": "^8.4.5",
"prettier": "^2.5.1",
"prettier-plugin-tailwindcss": "^0.1.3",
"standard-version": "^9.3.2",
"tailwindcss": "^3.0.15",
"typescript": "^4.5.4"
"tailwindcss": "^3.0.16",
"typescript": "^4.5.5"
},
"version": "1.0.0"
}
}
16 changes: 8 additions & 8 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import Footer from "../components/Footer";

const Home: FC = () => {
return (
<div className="flex flex-col items-center justify-center min-h-screen py-2">
<div className="flex min-h-screen flex-col items-center justify-center py-2">
<Head>
<title>Create Next App</title>
<link rel="icon" href="/favicon.ico" />
</Head>

<main className="flex flex-col items-center justify-center flex-1 w-full px-20 text-center">
<main className="flex w-full flex-1 flex-col items-center justify-center px-20 text-center">
<h1 className="text-6xl font-bold">
Welcome to{" "}
<a className="text-blue-600" href="https://nextjs.org">
Expand All @@ -20,15 +20,15 @@ const Home: FC = () => {

<p className="mt-3 text-2xl">
Get started by editing{" "}
<code className="p-3 font-mono text-lg bg-gray-100 rounded-md">
<code className="rounded-md bg-gray-100 p-3 font-mono text-lg">
pages/index.js
</code>
</p>

<div className="flex flex-wrap items-center justify-around max-w-4xl mt-6 sm:w-full">
<div className="mt-6 flex max-w-4xl flex-wrap items-center justify-around sm:w-full">
<a
href="https://nextjs.org/docs"
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600"
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600"
>
<h3 className="text-2xl font-bold">Documentation &rarr;</h3>
<p className="mt-4 text-xl">
Expand All @@ -38,7 +38,7 @@ const Home: FC = () => {

<a
href="https://nextjs.org/learn"
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600"
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600"
>
<h3 className="text-2xl font-bold">Learn &rarr;</h3>
<p className="mt-4 text-xl">
Expand All @@ -48,7 +48,7 @@ const Home: FC = () => {

<a
href="https://github.com/vercel/next.js/tree/master/examples"
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600"
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600"
>
<h3 className="text-2xl font-bold">Examples &rarr;</h3>
<p className="mt-4 text-xl">
Expand All @@ -58,7 +58,7 @@ const Home: FC = () => {

<a
href="https://vercel.com/import?filter=next.js&utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600"
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600"
>
<h3 className="text-2xl font-bold">Deploy &rarr;</h3>
<p className="mt-4 text-xl">
Expand Down
81 changes: 51 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -908,14 +908,14 @@
"@babel/helper-validator-identifier" "^7.15.7"
to-fast-properties "^2.0.0"

"@commitlint/cli@^16.0.2":
version "16.0.2"
resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-16.0.2.tgz#393b03793fc59b93e5f4dd7dd535a6cc5a7413ca"
integrity sha512-Jt7iaBjoLGC5Nq4dHPTvTYnqPGkElFPBtTXTvBpTgatZApczyjI2plE0oG4GYWPp1suHIS/VdVDOMpPZjGVusg==
"@commitlint/cli@^16.1.0":
version "16.1.0"
resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-16.1.0.tgz#022ad86008374b02974c9f3faf86affb785f4574"
integrity sha512-x5L1knvA3isRWBRVQx+Q6D45pA9139a2aZQYpxkljMG0dj4UHZkCnsYWpnGalxPxASI7nrI0KedKfS2YeQ55cQ==
dependencies:
"@commitlint/format" "^16.0.0"
"@commitlint/lint" "^16.0.0"
"@commitlint/load" "^16.0.0"
"@commitlint/load" "^16.1.0"
"@commitlint/read" "^16.0.0"
"@commitlint/types" "^16.0.0"
lodash "^4.17.19"
Expand All @@ -930,10 +930,10 @@
dependencies:
conventional-changelog-conventionalcommits "^4.3.1"

"@commitlint/config-validator@^16.0.0":
version "16.0.0"
resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-16.0.0.tgz#61dd84895e5dcab6066ff5e21e2b9a96b0ed6323"
integrity sha512-i80DGlo1FeC5jZpuoNV9NIjQN/m2dDV3jYGWg+1Wr+KldptkUHXj+6GY1Akll66lJ3D8s6aUGi3comPLHPtWHg==
"@commitlint/config-validator@^16.1.0":
version "16.1.0"
resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-16.1.0.tgz#410979f713ed55cbb85504d46295c1fd2419dc4d"
integrity sha512-2cHeZPNTuf1JWbMqyA46MkExor5HMSgv8JrdmzEakUbJHUreh35/wN00FJf57qGs134exQW2thiSQ1IJUsVx2Q==
dependencies:
"@commitlint/types" "^16.0.0"
ajv "^6.12.6"
Expand Down Expand Up @@ -977,14 +977,14 @@
"@commitlint/rules" "^16.0.0"
"@commitlint/types" "^16.0.0"

"@commitlint/load@^16.0.0":
version "16.0.0"
resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-16.0.0.tgz#4ab9f8502d0521209ce54d7cce58d419b8c35b48"
integrity sha512-7WhrGCkP6K/XfjBBguLkkI2XUdiiIyMGlNsSoSqgRNiD352EiffhFEApMy1/XOU+viwBBm/On0n5p0NC7e9/4A==
"@commitlint/load@^16.1.0":
version "16.1.0"
resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-16.1.0.tgz#7a884072ab915611080c5e99a1f1d999c05f4360"
integrity sha512-MtlEhKjP8jAF85jjX4mw8DUUwCxKsCgAc865hhpnwxjrfBcmGP7Up2AFE/M3ZMGDmSl1X1TMybQk/zohj8Cqdg==
dependencies:
"@commitlint/config-validator" "^16.0.0"
"@commitlint/config-validator" "^16.1.0"
"@commitlint/execute-rule" "^16.0.0"
"@commitlint/resolve-extends" "^16.0.0"
"@commitlint/resolve-extends" "^16.1.0"
"@commitlint/types" "^16.0.0"
chalk "^4.0.0"
cosmiconfig "^7.0.0"
Expand Down Expand Up @@ -1017,12 +1017,12 @@
fs-extra "^10.0.0"
git-raw-commits "^2.0.0"

"@commitlint/resolve-extends@^16.0.0":
version "16.0.0"
resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-16.0.0.tgz#2136f01d81bccc29091f2720b42c8c96aa59c56e"
integrity sha512-Z/w9MAQUcxeawpCLtjmkVNXAXOmB2nhW+LYmHEZcx9O6UTauF/1+uuZ2/r0MtzTe1qw2JD+1QHVhEWYHVPlkdA==
"@commitlint/resolve-extends@^16.1.0":
version "16.1.0"
resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-16.1.0.tgz#4b199197c45ddb436b59ef319662de6870f68fd5"
integrity sha512-8182s6AFoUFX6+FT1PgQDt15nO2ogdR/EN8SYVAdhNXw1rLz8kT5saB/ICw567GuRAUgFTUMGCXy3ctMOXPEDg==
dependencies:
"@commitlint/config-validator" "^16.0.0"
"@commitlint/config-validator" "^16.1.0"
"@commitlint/types" "^16.0.0"
import-fresh "^3.0.0"
lodash "^4.17.19"
Expand Down Expand Up @@ -2577,10 +2577,10 @@ eslint-plugin-tailwind@^0.2.1:
dependencies:
eslint-html-parser "^1.0.1"

eslint-plugin-tailwindcss@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.2.0.tgz#f614910bc6d102f272844ce0a31b16797fff3b62"
integrity sha512-u/07TN03dYaqjRqY2LPA9LjkM5rO7Z02aXNJ/5PwnB4AHVZrI++7qbr0E3WLKaHQzsF/bsrrxuTd502h3IyNhg==
eslint-plugin-tailwindcss@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.3.2.tgz#effe45fc325ecf06648b5f3259ac6af1e8c3d313"
integrity sha512-p1Xv++pFmCMUbPCZe+1snO66h+hC/HFFZpWjM38LMA3zV4XF2YHc0E+VUMFUvPEEl7K2VLxxGonlC9bnEsm2mA==
dependencies:
fast-glob "^3.2.5"
postcss "^8.4.4"
Expand Down Expand Up @@ -2825,6 +2825,17 @@ fast-glob@^3.1.1, fast-glob@^3.2.5, fast-glob@^3.2.7:
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-glob@^3.2.11:
version "3.2.11"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9"
integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.2"
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
Expand Down Expand Up @@ -4461,6 +4472,11 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=

prettier-plugin-tailwindcss@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.1.3.tgz#904d31084fef0a6070e185707b599aa3c153a53c"
integrity sha512-k+X4HfaLHXwGlu3JdW6XahQIk3lvzBtx2F2jSMFmOU6Mqll9dhZdGz1MJFAHxzvLxEWvMWZQA4MmCIhsDid5Kg==

prettier@^2.5.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a"
Expand Down Expand Up @@ -5262,10 +5278,10 @@ table@^5.2.3:
slice-ansi "^2.1.0"
string-width "^3.0.0"

tailwindcss@^3.0.15:
version "3.0.15"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.0.15.tgz#e4db219771eb7678a3bfd97b3f6c8fe20be0a410"
integrity sha512-bT2iy7FtjwgsXik4ZoJnHXR+SRCiGR1W95fVqpLZebr64m4ahwUwRbIAc5w5+2fzr1YF4Ct2eI7dojMRRl8sVQ==
tailwindcss@^3.0.16:
version "3.0.16"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.0.16.tgz#eb6e7a0ecec56e43b9dad439b8cb3a5da1e0c1a3"
integrity sha512-1L8E5Wr+o1c4kxxObNz2owJe94a7BLEMV+2Lz6wzprJdcs3ENSRR9t4OZf2OqtRNS/q/zFPuOKoLtQoy3Lrhhw==
dependencies:
arg "^5.0.1"
chalk "^4.1.2"
Expand All @@ -5275,7 +5291,7 @@ tailwindcss@^3.0.15:
detective "^5.2.0"
didyoumean "^1.2.2"
dlv "^1.1.3"
fast-glob "^3.2.7"
fast-glob "^3.2.11"
glob-parent "^6.0.2"
is-glob "^4.0.3"
normalize-path "^3.0.0"
Expand Down Expand Up @@ -5494,11 +5510,16 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^4.4.3, typescript@^4.5.4:
typescript@^4.4.3:
version "4.5.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.4.tgz#a17d3a0263bf5c8723b9c52f43c5084edf13c2e8"
integrity sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==

typescript@^4.5.5:
version "4.5.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3"
integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==

uglify-js@^3.1.4:
version "3.14.4"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.4.tgz#68756f17d1b90b9d289341736cb9a567d6882f90"
Expand Down

1 comment on commit d910e6e

@vercel
Copy link

@vercel vercel bot commented on d910e6e Jan 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.