Skip to content

Commit d8ac5a4

Browse files
committed
chore: add prettier config
1 parent f383f50 commit d8ac5a4

4 files changed

Lines changed: 147 additions & 13 deletions

File tree

.prettierrc.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
tabWidth: 2,
3+
semi: true,
4+
arrowParens: 'avoid',
5+
singleQuote: true,
6+
jsxSingleQuote: true,
7+
bracketSameLine: true,
8+
importOrder: ['^node:', '<THIRD_PARTY_MODULES>', '^~', '^[./]'],
9+
importOrderSeparation: true,
10+
plugins: [
11+
'prettier-plugin-tailwindcss',
12+
'@trivago/prettier-plugin-sort-imports',
13+
],
14+
};

package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"prepublishOnly": "pnpm build:lib"
2020
},
2121
"devDependencies": {
22+
"@trivago/prettier-plugin-sort-imports": "3.3.0",
2223
"@types/jest": "^29.0.3",
2324
"@typescript-eslint/eslint-plugin": "^5.37.0",
2425
"@typescript-eslint/parser": "^5.37.0",
@@ -28,20 +29,15 @@
2829
"eslint-plugin-react": "^7.31.8",
2930
"eslint-plugin-react-hooks": "^4.6.0",
3031
"jest": "^29.0.3",
32+
"prettier": "2.7.1",
33+
"prettier-plugin-tailwindcss": "0.1.13",
3134
"typescript": "^4.8.3"
3235
},
3336
"config": {
3437
"commitizen": {
3538
"path": "./node_modules/cz-conventional-changelog"
3639
}
3740
},
38-
"prettier": {
39-
"tabWidth": 2,
40-
"semi": true,
41-
"singleQuote": true,
42-
"jsxSingleQuote": true,
43-
"printWidth": 80
44-
},
4541
"pnpm": {
4642
"overrides": {
4743
"@types/react": "^18.0.20",

pnpm-lock.yaml

Lines changed: 126 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/pages/index.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Head from 'next/head';
22
import Image from 'next/image';
3+
34
import styles from '../styles/Home.module.css';
45

56
const Home = () => {
@@ -34,16 +35,14 @@ const Home = () => {
3435

3536
<a
3637
href='https://github.com/vercel/next.js/tree/canary/examples'
37-
className={styles.card}
38-
>
38+
className={styles.card}>
3939
<h2>Examples &rarr;</h2>
4040
<p>Discover and deploy boilerplate example Next.js projects.</p>
4141
</a>
4242

4343
<a
4444
href='https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app'
45-
className={styles.card}
46-
>
45+
className={styles.card}>
4746
<h2>Deploy &rarr;</h2>
4847
<p>
4948
Instantly deploy your Next.js site to a public URL with Vercel.
@@ -56,8 +55,7 @@ const Home = () => {
5655
<a
5756
href='https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app'
5857
target='_blank'
59-
rel='noopener noreferrer'
60-
>
58+
rel='noopener noreferrer'>
6159
Powered by{' '}
6260
<span className={styles.logo}>
6361
<Image src='/vercel.svg' alt='Vercel Logo' width={72} height={16} />

0 commit comments

Comments
 (0)