Skip to content

Commit

Permalink
chore: add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermedeandrade committed Oct 14, 2022
1 parent 48229cd commit 0b41818
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@guilhermedeandrade/prettier-config"
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
"preview": "vite preview",
"prettier": "prettier --write \"src/**/*.{js,ts,tsx,css}\""
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@guilhermedeandrade/prettier-config": "^1.0.0",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.1.0",
"prettier": "^2.7.1",
"typescript": "^4.6.4",
"vite": "^3.1.0"
}
Expand Down
14 changes: 14 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react'
import {useState} from 'react'
import reactLogo from './assets/react.svg'
import './App.css'

Expand All @@ -17,7 +17,7 @@ function App() {
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
<button onClick={() => setCount(count => count + 1)}>
count is {count}
</button>
<p>
Expand Down
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import './index.css'
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<App />
</React.StrictMode>
</React.StrictMode>,
)

0 comments on commit 0b41818

Please sign in to comment.