Skip to content

Commit

Permalink
➕ Add prettier for code formating
Browse files Browse the repository at this point in the history
  • Loading branch information
satnaing committed Nov 9, 2022
1 parent 28458ed commit b879b12
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Ignore everything
/*

# Except these files & folders
!/components
!/contents
!/context
!/hooks
!/pages
!/sections
!/styles
!/utils
!/.github
!tsconfig.json
!tailwind.config.js
!postcss.config.js
!next.config.js
!package.json
!.prettierrc
!.eslintrc.json
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"arrowParens": "avoid",
"semi": true,
"tabWidth": 2,
"printWidth": 80,
"singleQuote": false,
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"endOfLine": "lf"
}
22 changes: 22 additions & 0 deletions package-lock.json

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

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"format:check": "prettier --check .",
"format": "prettier --write ."
},
"dependencies": {
"gray-matter": "^4.0.3",
Expand All @@ -30,6 +32,7 @@
"eslint": "^8.27.0",
"eslint-config-next": "^13.0.2",
"postcss": "^8.4.18",
"prettier": "^2.7.1",
"tailwindcss": "^3.2.2",
"typescript": "4.8.4"
}
Expand Down

0 comments on commit b879b12

Please sign in to comment.