Prettier: no semi, spaces 2, single quote, trailing comma

This commit is contained in:
Austin Chen 2021-12-02 17:49:46 -06:00
parent 2bc8f0b429
commit 20a425df6e
11 changed files with 44 additions and 37 deletions

View File

@ -1 +1,7 @@
{} {
"tabWidth": 2,
"useTabs": false,
"semi": false,
"trailingComma": "es5",
"singleQuote": true
}

View File

@ -8,6 +8,6 @@
## Formatting ## Formatting
Before committing, run `npx prettier --write . ` Before committing, run `npm run format` to format your code.
Recommended: Use a [Prettier editor integration](https://prettier.io/docs/en/editors.html) to automatically format on save Recommended: Use a [Prettier editor integration](https://prettier.io/docs/en/editors.html) to automatically format on save

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,13 @@
import { Popover } from "@headlessui/react"; import { Popover } from '@headlessui/react'
import { ConvertKitEmailForm } from "./convert-kit-email-form"; import { ConvertKitEmailForm } from './convert-kit-email-form'
const navigation = [ const navigation = [
{ {
name: "About", name: 'About',
href: "https://mantic.notion.site/About-Mantic-Markets-09bdde9044614e62a27477b4b1bf77ea", href: 'https://mantic.notion.site/About-Mantic-Markets-09bdde9044614e62a27477b4b1bf77ea',
}, },
{ name: "Simulator", href: "https://simulator.mantic.markets" }, { name: 'Simulator', href: 'https://simulator.mantic.markets' },
]; ]
export const Hero = () => { export const Hero = () => {
return ( return (
@ -78,5 +78,5 @@ export const Hero = () => {
</div> </div>
</main> </main>
</div> </div>
); )
}; }

View File

@ -1,4 +1,4 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
module.exports = { module.exports = {
reactStrictMode: true, reactStrictMode: true,
}; }

View File

@ -5,7 +5,8 @@
"dev": "next dev", "dev": "next dev",
"build": "next build && next export", "build": "next build && next export",
"start": "next start", "start": "next start",
"lint": "next lint" "lint": "next lint",
"format": "npx prettier --write ."
}, },
"dependencies": { "dependencies": {
"@headlessui/react": "^1.4.2", "@headlessui/react": "^1.4.2",

View File

@ -1,8 +1,8 @@
import "tailwindcss/tailwind.css"; import 'tailwindcss/tailwind.css'
import type { AppProps } from "next/app"; import type { AppProps } from 'next/app'
function MyApp({ Component, pageProps }: AppProps) { function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />; return <Component {...pageProps} />
} }
export default MyApp; export default MyApp

View File

@ -1,13 +1,13 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from "next"; import type { NextApiRequest, NextApiResponse } from 'next'
type Data = { type Data = {
name: string; name: string
}; }
export default function handler( export default function handler(
req: NextApiRequest, req: NextApiRequest,
res: NextApiResponse<Data> res: NextApiResponse<Data>
) { ) {
res.status(200).json({ name: "John Doe" }); res.status(200).json({ name: 'John Doe' })
} }

View File

@ -1,7 +1,7 @@
import type { NextPage } from "next"; import type { NextPage } from 'next'
import Head from "next/head"; import Head from 'next/head'
import React from "react"; import React from 'react'
import { Hero } from "../components/hero"; import { Hero } from '../components/hero'
const Home: NextPage = () => { const Home: NextPage = () => {
return ( return (
@ -21,7 +21,7 @@ const Home: NextPage = () => {
<Hero /> <Hero />
</div> </div>
); )
}; }
export default Home; export default Home

View File

@ -5,4 +5,4 @@ module.exports = {
tailwindcss: {}, tailwindcss: {},
autoprefixer: {}, autoprefixer: {},
}, },
}; }

View File

@ -1,19 +1,19 @@
module.exports = { module.exports = {
mode: "jit", mode: 'jit',
purge: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"], purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
darkMode: false, // or 'media' or 'class' darkMode: false, // or 'media' or 'class'
theme: { theme: {
fontFamily: { fontFamily: {
"major-mono": ["Major Mono Display", "monospace"], 'major-mono': ['Major Mono Display', 'monospace'],
}, },
extend: { extend: {
backgroundImage: { backgroundImage: {
"world-trading": "url('/world-trading-background.jpg')", 'world-trading': "url('/world-trading-background.jpg')",
}, },
}, },
}, },
variants: { variants: {
extend: {}, extend: {},
}, },
plugins: [require("@tailwindcss/forms")], plugins: [require('@tailwindcss/forms')],
}; }