Skip to content

Commit

Permalink
Added ESLint config (#84)
Browse files Browse the repository at this point in the history
* Added ESLint

* Fixed linting warnings / errors

* Update Cloudinary.tsx

* Update Cloudinary.tsx

Co-authored-by: Steven Tey <[email protected]>
  • Loading branch information
NuroDev and steven-tey authored Mar 31, 2022
1 parent 5d2479f commit e3c9664
Show file tree
Hide file tree
Showing 15 changed files with 3,855 additions and 308 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
6 changes: 4 additions & 2 deletions components/Cloudinary.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable */

import Head from "next/head";

import type { MouseEvent, ReactNode } from "react";
Expand Down Expand Up @@ -46,8 +48,8 @@ export default function CloudinaryUploadWidget({
<>
<Head>
// this is Next.js specific, but if you're using something like Create
React App, // you could download the script in componentDidMount using
this method: https://stackoverflow.com/a/34425083/1424568
// React App, you could download the script in componentDidMount using
// this method: https://stackoverflow.com/a/34425083/1424568
<script
src="https://widget.cloudinary.com/v2.0/global/all.js"
type="text/javascript"
Expand Down
5 changes: 3 additions & 2 deletions components/app/DomainCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ export default function DomainCard({ data, setData }: DomainCardProps) {
<div className="w-full max-w-2xl mt-10 border border-black rounded-lg py-10">
<div className="flex flex-col space-y-4 sm:flex-row sm:space-x-4 justify-between px-10">
<a
className="text-xl font-semibold flex justify-center sm:justify-start items-center"
href={`http://${data.customDomain}`}
rel="noreferrer"
target="_blank"
className="text-xl font-semibold flex justify-center sm:justify-start items-center"
>
{data.customDomain}
<span className="inline-block ml-2">
Expand All @@ -50,7 +51,7 @@ export default function DomainCard({ data, setData }: DomainCardProps) {
strokeLinecap="round"
strokeLinejoin="round"
fill="none"
shape-rendering="geometricPrecision"
shapeRendering="geometricPrecision"
>
<path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" />
<path d="M15 3h6v6" />
Expand Down
3 changes: 2 additions & 1 deletion components/app/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ export default function Layout({ siteId, children }: LayoutProps) {
</button>
</div>
<a
className="font-cal flex items-center space-x-2 text-gray-700 px-5 py-3 sm:hover:text-black sm:hover:bg-white transition-all ease-in-out duration-150"
href="https://github.com/vercel/platforms"
rel="noreferrer"
target="_blank"
className="font-cal flex items-center space-x-2 text-gray-700 px-5 py-3 sm:hover:text-black sm:hover:bg-white transition-all ease-in-out duration-150"
>
<p className="hidden sm:block">Build my own</p>
<svg
Expand Down
16 changes: 12 additions & 4 deletions components/mdx/Tweet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export default function Tweet({ id, metadata, className }: TweetProps) {
<a
className="!no-underline !text-[#1da1f2]"
href={`https://twitter.com/${repliedTo.author.username}`}
rel="noreferrer"
target="_blank"
>
@{repliedTo.author.username}
Expand All @@ -187,8 +188,8 @@ export default function Tweet({ id, metadata, className }: TweetProps) {
: "inline-grid grid-cols-2 gap-x-2 gap-y-2 my-2"
}
>
{media.map((m) => (
<a href={tweetUrl} target="_blank">
{media.map((m, i) => (
<a href={tweetUrl} key={i} rel="noreferrer" target="_blank">
{m.type == "video" || m.type == "animated_gif" ? (
video ? (
<video
Expand Down Expand Up @@ -229,6 +230,7 @@ export default function Tweet({ id, metadata, className }: TweetProps) {
<a
className="!no-underline"
href={url_meta.unwound_url}
rel="noreferrer"
target="_blank"
>
<div className="rounded-2xl overflow-hidden border border-gray-200 drop-shadow-sm mb-5">
Expand Down Expand Up @@ -257,8 +259,14 @@ export default function Tweet({ id, metadata, className }: TweetProps) {
);
return poll.voting_status == "open" ? (
<div>
{poll.options.map((option) => (
<a href={tweetUrl} target="_blank" className="!no-underline">
{poll.options.map((option, i) => (
<a
className="!no-underline"
href={tweetUrl}
key={i}
rel="noreferrer"
target="_blank"
>
<div className="text-center font-bold text-[#1da1f2] border border-[#1da1f2] rounded-3xl my-2 hover:bg-[#1da1f2] hover:bg-opacity-10 transition-all ease-in-out duration-150">
{option.label}
</div>
Expand Down
9 changes: 6 additions & 3 deletions components/sites/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ export default function Layout({ meta, children, subdomain }: LayoutProps) {
This is a demo site showcasing how to build a multi-tenant
application with{" "}
<a
className="text-black font-semibold underline"
href="https://platformize.co"
rel="noreferrer"
target="_blank"
className="text-black font-semibold underline"
>
custom domain
</a>{" "}
Expand All @@ -148,16 +149,18 @@ export default function Layout({ meta, children, subdomain }: LayoutProps) {
} flex space-y-3 sm:space-y-0 sm:space-x-3 sm:flex-row flex-col lg:w-auto w-full text-center`}
>
<a
className="flex-auto font-cal text-lg rounded-md py-1 sm:py-3 px-5 text-black border border-gray-200 hover:border-black transition-all ease-in-out duration-150 whitespace-no-wrap"
href="https://app.vercel.pub"
rel="noreferrer"
target="_blank"
className="flex-auto font-cal text-lg rounded-md py-1 sm:py-3 px-5 text-black border border-gray-200 hover:border-black transition-all ease-in-out duration-150 whitespace-no-wrap"
>
Create your publication
</a>
<a
className="flex-auto font-cal text-lg bg-black text-white border border-black rounded-md py-1 sm:py-3 px-5 hover:text-black hover:bg-white transition-all ease-in-out duration-150 whitespace-no-wrap"
href="https://vercel.com/guides/nextjs-multi-tenant-application"
rel="noreferrer"
target="_blank"
className="flex-auto font-cal text-lg bg-black text-white border border-black rounded-md py-1 sm:py-3 px-5 hover:text-black hover:bg-white transition-all ease-in-out duration-150 whitespace-no-wrap"
>
Clone and deploy
</a>
Expand Down
Loading

0 comments on commit e3c9664

Please sign in to comment.