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
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

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

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

View File

@ -1,8 +1,8 @@
import "tailwindcss/tailwind.css";
import type { AppProps } from "next/app";
import 'tailwindcss/tailwind.css'
import type { AppProps } from 'next/app'
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
import type { NextApiRequest, NextApiResponse } from "next";
import type { NextApiRequest, NextApiResponse } from 'next'
type Data = {
name: string;
};
name: string
}
export default function handler(
req: NextApiRequest,
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 Head from "next/head";
import React from "react";
import { Hero } from "../components/hero";
import type { NextPage } from 'next'
import Head from 'next/head'
import React from 'react'
import { Hero } from '../components/hero'
const Home: NextPage = () => {
return (
@ -21,7 +21,7 @@ const Home: NextPage = () => {
<Hero />
</div>
);
};
)
}
export default Home;
export default Home

View File

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

View File

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