Skip to content

Commit

Permalink
Merge pull request #157 from turbo-eth/fix/lint-format
Browse files Browse the repository at this point in the history
Fix/lint-format
  • Loading branch information
0xJBass authored Aug 30, 2023
2 parents 0fbede5 + 969bdfb commit 6c28105
Show file tree
Hide file tree
Showing 559 changed files with 17,969 additions and 10,802 deletions.
38 changes: 38 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* eslint-env node */
module.exports = {
root: true,
extends: [
"next/core-web-vitals",
"eslint:recommended",
"prettier",
"plugin:tailwindcss/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
plugins: ["@typescript-eslint", "tailwindcss"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
rules: {
"@next/next/no-html-link-for-pages": "off",
"@next/next/no-img-element": "off", // We currently not using next/image because it isn't supported with SSG mode
"react-hooks/exhaustive-deps": "off", // Incorrectly report needed dependency with Next.js router
"tailwindcss/no-custom-classname": "off",
"tailwindcss/classnames-order": "error",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"no-unused-vars": "off",
},
settings: {
tailwindcss: {
callees: ["cn", "cva"],
config: "tailwind.config.js",
},
next: {
rootDir: true,
},
},
}
78 changes: 0 additions & 78 deletions .eslintrc.json

This file was deleted.

6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on:
on:
push:
branches:
- main
Expand Down Expand Up @@ -38,12 +38,10 @@ jobs:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check formatting and linting
run: pnpm run-ci


12 changes: 5 additions & 7 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
dist
node_modules
.next
build
pnpm-lock.yaml
**/generated/**-wagmi.ts
**/generated/blockchain.ts
**/generated/

.next/**
.husky/**
.vscode/**
.github/**

pnpm-lock.yaml
9 changes: 0 additions & 9 deletions .prettierrc.json

This file was deleted.

15 changes: 5 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@
"source.addMissingImports",
"source.fixAll.eslint"
],
"eslint.validate": [
"typescript",
"javascript",
"javascriptreact"
],
"eslint.validate": ["typescript", "javascript", "javascriptreact"],
"jest.autoRun": {
"watch": true, // Start the jest with the watch flag
"onStartup": [
"all-tests"
] // Run all tests upon project launch
"onStartup": ["all-tests"] // Run all tests upon project launch
},
"jest.showCoverageOnLoad": true, // Show code coverage when the project is launched
"jest.showTerminalOnLaunch": false, // Don't automatically open test explorer terminal on launch
Expand All @@ -33,5 +27,6 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.tsdk": "node_modules/.pnpm/[email protected]/node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
"typescript.enablePromptUseWorkspaceTsdk": true,
"prettier.prettierPath": "./node_modules/prettier" // Workaround fix for prettier force checking node modules.
}
27 changes: 16 additions & 11 deletions app/(general)/account/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use client'
import { motion } from 'framer-motion'
"use client"

import { WalletAddress } from '@/components/blockchain/wallet-address'
import { WalletBalance } from '@/components/blockchain/wallet-balance'
import { WalletNonce } from '@/components/blockchain/wallet-nonce'
import { IsWalletConnected } from '@/components/shared/is-wallet-connected'
import { IsWalletDisconnected } from '@/components/shared/is-wallet-disconnected'
import { FADE_DOWN_ANIMATION_VARIANTS } from '@/config/design'
import { motion } from "framer-motion"

import { FADE_DOWN_ANIMATION_VARIANTS } from "@/config/design"
import { WalletAddress } from "@/components/blockchain/wallet-address"
import { WalletBalance } from "@/components/blockchain/wallet-balance"
import { WalletNonce } from "@/components/blockchain/wallet-nonce"
import { IsWalletConnected } from "@/components/shared/is-wallet-connected"
import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected"

export default function PageDashboardAccount() {
return (
Expand All @@ -17,13 +18,15 @@ export default function PageDashboardAccount() {
initial="hidden"
variants={FADE_DOWN_ANIMATION_VARIANTS}
viewport={{ once: true }}
whileInView="show">
whileInView="show"
>
<IsWalletConnected>
<div className="card w-[420px]">
<h3 className="text-2xl font-normal">Account</h3>
<hr className="my-3 dark:opacity-30" />
<div className="mt-3">
<span className="mr-1 font-bold">Address:</span> <WalletAddress truncate />
<span className="mr-1 font-bold">Address:</span>{" "}
<WalletAddress truncate />
</div>
<div className="mt-3">
<span className="mr-1 font-bold">Balance:</span> <WalletBalance />
Expand All @@ -35,7 +38,9 @@ export default function PageDashboardAccount() {
</div>
</IsWalletConnected>
<IsWalletDisconnected>
<h3 className="text-lg font-normal">Connect Wallet to view your personalized dashboard.</h3>
<h3 className="text-lg font-normal">
Connect Wallet to view your personalized dashboard.
</h3>
</IsWalletDisconnected>
</motion.div>
</>
Expand Down
50 changes: 33 additions & 17 deletions app/(general)/integration/aave/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
'use client'
import { ReactNode } from 'react'
"use client"

import { motion } from 'framer-motion'
import Image from 'next/image'
import Balancer from 'react-wrap-balancer'
import { ReactNode } from "react"
import Image from "next/image"
import { turboIntegrations } from "@/data/turbo-integrations"
import { motion } from "framer-motion"
import Balancer from "react-wrap-balancer"

import { WalletConnect } from '@/components/blockchain/wallet-connect'
import { IsWalletConnected } from '@/components/shared/is-wallet-connected'
import { IsWalletDisconnected } from '@/components/shared/is-wallet-disconnected'
import { LinkComponent } from '@/components/shared/link-component'
import { FADE_DOWN_ANIMATION_VARIANTS } from '@/config/design'
import { turboIntegrations } from '@/data/turbo-integrations'
import { FADE_DOWN_ANIMATION_VARIANTS } from "@/config/design"
import { WalletConnect } from "@/components/blockchain/wallet-connect"
import { IsWalletConnected } from "@/components/shared/is-wallet-connected"
import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected"
import { LinkComponent } from "@/components/shared/link-component"

export default function AaveLayout({ children }: { children: ReactNode }) {
return (
Expand All @@ -31,17 +31,33 @@ export default function AaveLayout({ children }: { children: ReactNode }) {
staggerChildren: 0.15,
},
},
}}>
<Image alt="Aave Icon" className="mx-auto mb-5" height={100} src={turboIntegrations.aave.imgDark} width={100} />
}}
>
<Image
alt="Aave Icon"
className="mx-auto mb-5"
height={100}
src={turboIntegrations.aave.imgDark}
width={100}
/>
<motion.h1
className="pb-5 text-center text-2xl font-bold tracking-[-0.02em] drop-shadow-sm md:text-8xl md:leading-[6rem]"
variants={FADE_DOWN_ANIMATION_VARIANTS}>
variants={FADE_DOWN_ANIMATION_VARIANTS}
>
Aave
</motion.h1>
<motion.p className=" mb-8 text-center text-gray-500 dark:text-gray-200 md:text-xl" variants={FADE_DOWN_ANIMATION_VARIANTS}>
<Balancer className="w-full text-xl font-semibold">Borrow and lend assets seamlessly</Balancer>
<motion.p
className=" mb-8 text-center text-gray-500 dark:text-gray-200 md:text-xl"
variants={FADE_DOWN_ANIMATION_VARIANTS}
>
<Balancer className="w-full text-xl font-semibold">
Borrow and lend assets seamlessly
</Balancer>
</motion.p>
<motion.div className="my-4 text-xl" variants={FADE_DOWN_ANIMATION_VARIANTS}>
<motion.div
className="my-4 text-xl"
variants={FADE_DOWN_ANIMATION_VARIANTS}
>
<LinkComponent isExternal href={turboIntegrations.aave.url}>
<button className="btn btn-primary">Documentation</button>
</LinkComponent>
Expand Down
6 changes: 3 additions & 3 deletions app/(general)/integration/aave/opengraph-image.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { IntegrationOgImage } from '@/components/ui/social/og-image-integrations'
import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations"

export const runtime = 'edge'
export const runtime = "edge"
export const size = {
width: 1200,
height: 630,
}

export default IntegrationOgImage('aave')
export default IntegrationOgImage("aave")
Loading

1 comment on commit 6c28105

@vercel
Copy link

@vercel vercel bot commented on 6c28105 Aug 30, 2023

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.