Skip to content

Commit

Permalink
tailwind eslint (#35)
Browse files Browse the repository at this point in the history
* add tailwind native prettier plugin, remove old one

* run prettier on main page

* update tests
  • Loading branch information
agcty authored Mar 6, 2022
1 parent f76e963 commit e9764c5
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 560 deletions.
8 changes: 0 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,8 @@
"plugins": ["testing-library", "unused-imports", "prettier"],
"extends": [
"next/core-web-vitals",
"plugin:jest-dom/recommended",
"plugin:tailwind/recommended",
"plugin:prettier/recommended"
],
"env": {
"es6": true,
"browser": true,
"jest": true,
"node": true
},
"rules": {
"no-unused-vars": "off",
"react/require-default-props": 0,
Expand Down
90 changes: 45 additions & 45 deletions __tests__/__snapshots__/snapshot.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,39 @@ exports[`renders homepage unchanged 1`] = `
<div>
<div>
<main
class="flex justify-center min-h-screen py-20 bg-gradient-to-b from-gray-50 via-gray-50 to-gray-100"
class="flex min-h-screen justify-center bg-gradient-to-b from-gray-50 via-gray-50 to-gray-100 py-20"
>
<div>
<h1
class="px-5 text-4xl font-bold leading-tight tracking-tight text-center sm:mt-4 sm:text-6xl"
class="px-5 text-center text-4xl font-bold leading-tight tracking-tight sm:mt-4 sm:text-6xl"
>
Next.js
<br />
Advanced Starter
</h1>
<h2
class="max-w-4xl px-10 mx-auto mt-8 text-base tracking-tight text-center text-gray-600 sm:text-2xl md:mt-5 md:text-2xl"
class="mx-auto mt-8 max-w-4xl px-10 text-center text-base tracking-tight text-gray-600 sm:text-2xl md:mt-5 md:text-2xl"
>
Tailwind CSS 3.0, ESLint & Prettier without a single line of config! Easily extendable zero-config template for pros and beginners.
</h2>
<div
class="px-4 sm:px-0"
>
<section
class="w-full mt-6 bg-white rounded-lg grid grid-cols-1 sm:mt-20 sm:grid-cols-2 sm:min-w-[1000px] min-h-[350px]"
class="mt-6 grid min-h-[350px] w-full grid-cols-1 rounded-lg bg-white sm:mt-20 sm:min-w-[1000px] sm:grid-cols-2"
style="box-shadow: rgba(0, 0, 0, 0.12) 0px 30px 60px 0px;"
>
<div
class="flex flex-col justify-center rounded-l-lg bg-gray-50"
>
<ul
class="px-12 py-12 space-y-5"
class="space-y-5 px-12 py-12"
>
<li
class="flex items-center"
>
<svg
class="flex-shrink-0 hidden w-5 h-5 p-1 text-gray-100 bg-blue-600 rounded-full sm:inline hiddden"
class="hiddden hidden h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:inline"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -49,14 +49,14 @@ exports[`renders homepage unchanged 1`] = `
/>
</svg>
<p
class="hidden ml-3 text-lg text-gray-600 sm:inline"
class="ml-3 hidden text-lg text-gray-600 sm:inline"
>
Fast design workflow with
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -75,10 +75,10 @@ exports[`renders homepage unchanged 1`] = `
class="mx-auto sm:hidden"
>
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -98,7 +98,7 @@ exports[`renders homepage unchanged 1`] = `
class="flex items-center"
>
<svg
class="flex-shrink-0 hidden w-5 h-5 p-1 text-gray-100 bg-blue-600 rounded-full sm:inline hiddden"
class="hiddden hidden h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:inline"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -111,13 +111,13 @@ exports[`renders homepage unchanged 1`] = `
/>
</svg>
<p
class="hidden ml-3 text-lg text-gray-600 sm:inline"
class="ml-3 hidden text-lg text-gray-600 sm:inline"
>
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -137,10 +137,10 @@ exports[`renders homepage unchanged 1`] = `
class="mx-auto sm:hidden"
>
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -160,7 +160,7 @@ exports[`renders homepage unchanged 1`] = `
class="flex items-center"
>
<svg
class="flex-shrink-0 hidden w-5 h-5 p-1 text-gray-100 bg-blue-600 rounded-full sm:inline hiddden"
class="hiddden hidden h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:inline"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -173,14 +173,14 @@ exports[`renders homepage unchanged 1`] = `
/>
</svg>
<p
class="hidden ml-3 text-lg text-gray-600 sm:inline"
class="ml-3 hidden text-lg text-gray-600 sm:inline"
>
Customizable
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -199,10 +199,10 @@ exports[`renders homepage unchanged 1`] = `
class="mx-auto sm:hidden"
>
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -222,7 +222,7 @@ exports[`renders homepage unchanged 1`] = `
class="flex items-center"
>
<svg
class="flex-shrink-0 hidden w-5 h-5 p-1 text-gray-100 bg-blue-600 rounded-full sm:inline hiddden"
class="hiddden hidden h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:inline"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -235,13 +235,13 @@ exports[`renders homepage unchanged 1`] = `
/>
</svg>
<p
class="hidden ml-3 text-lg text-gray-600 sm:inline"
class="ml-3 hidden text-lg text-gray-600 sm:inline"
>
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -261,10 +261,10 @@ exports[`renders homepage unchanged 1`] = `
class="mx-auto sm:hidden"
>
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -284,7 +284,7 @@ exports[`renders homepage unchanged 1`] = `
class="flex items-center"
>
<svg
class="flex-shrink-0 hidden w-5 h-5 p-1 text-gray-100 bg-blue-600 rounded-full sm:inline hiddden"
class="hiddden hidden h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:inline"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -297,14 +297,14 @@ exports[`renders homepage unchanged 1`] = `
/>
</svg>
<p
class="hidden ml-3 text-lg text-gray-600 sm:inline"
class="ml-3 hidden text-lg text-gray-600 sm:inline"
>
Standardized
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -323,10 +323,10 @@ exports[`renders homepage unchanged 1`] = `
class="mx-auto sm:hidden"
>
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -346,7 +346,7 @@ exports[`renders homepage unchanged 1`] = `
class="flex items-center"
>
<svg
class="flex-shrink-0 hidden w-5 h-5 p-1 text-gray-100 bg-blue-600 rounded-full sm:inline hiddden"
class="hiddden hidden h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:inline"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -359,14 +359,14 @@ exports[`renders homepage unchanged 1`] = `
/>
</svg>
<p
class="hidden ml-3 text-lg text-gray-600 sm:inline"
class="ml-3 hidden text-lg text-gray-600 sm:inline"
>
Ready-to-go
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -386,10 +386,10 @@ exports[`renders homepage unchanged 1`] = `
class="mx-auto sm:hidden"
>
<span
class="inline-flex items-center px-3 py-2 font-medium text-gray-700 bg-gray-100 rounded-md"
class="inline-flex items-center rounded-md bg-gray-100 px-3 py-2 font-medium text-gray-700"
>
<svg
class="inline-flex flex-shrink-0 w-5 h-5 p-1 mr-3 text-gray-100 bg-blue-600 rounded-full sm:hidden"
class="mr-3 inline-flex h-5 w-5 flex-shrink-0 rounded-full bg-blue-600 p-1 text-gray-100 sm:hidden"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -408,7 +408,7 @@ exports[`renders homepage unchanged 1`] = `
</ul>
</div>
<div
class="px-4 py-24 text-center space-y-5 place-self-center"
class="space-y-5 place-self-center px-4 py-24 text-center"
>
<h3
class="text-3xl font-bold"
Expand All @@ -419,7 +419,7 @@ exports[`renders homepage unchanged 1`] = `
class="inline-flex rounded-md shadow-sm"
>
<a
class="inline-flex items-center px-4 py-4 font-medium text-white bg-blue-600 border border-transparent leading-6 transition duration-150 ease-in-out rounded-md sm:px-10 hover:bg-blue-500 focus:outline-none focus:border-blue-700 focus:ring-blue-400 active:bg-blue-700 focus:ring-4"
class="inline-flex items-center rounded-md border border-transparent bg-blue-600 px-4 py-4 font-medium leading-6 text-white transition duration-150 ease-in-out hover:bg-blue-500 focus:border-blue-700 focus:outline-none focus:ring-4 focus:ring-blue-400 active:bg-blue-700 sm:px-10"
href="https://github.com/agcty/nextjs-advanced-starter"
type="button"
>
Expand All @@ -429,12 +429,12 @@ exports[`renders homepage unchanged 1`] = `
</div>
</section>
<p
class="mt-6 text-xs font-medium text-center text-gray-600"
class="mt-6 text-center text-xs font-medium text-gray-600"
>
Built by
<a
class="font-medium text-blue-600 transition duration-150 ease-in-out hover:text-blue-500 focus:outline-none focus:underline"
class="font-medium text-blue-600 transition duration-150 ease-in-out hover:text-blue-500 focus:underline focus:outline-none"
href="https://twitter.com/agctyz"
>
@agctyz
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
"eslint-config-next": "^12.1.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tailwind": "^0.2.1",
"eslint-plugin-testing-library": "^5.0.6",
"eslint-plugin-unused-imports": "^2.0.0",
"jest": "^27.5.1",
"postcss": "^8.4.7",
"prettier": "^2.5.1",
"prettier-plugin-tailwindcss": "^0.1.8",
"tailwindcss": "^3.0.23",
"typescript": "^4.6.2"
}
Expand Down
Loading

1 comment on commit e9764c5

@vercel
Copy link

@vercel vercel bot commented on e9764c5 Mar 6, 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.