Skip to content

Commit

Permalink
chore(frontend): prettier formating
Browse files Browse the repository at this point in the history
- add a `format` script to run prettier.
- change the line width from 120 to 100.
- ignore the generated API client.
  • Loading branch information
eatyourgreens committed May 22, 2024
1 parent ce4687c commit 177c178
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ignore auto-generated code
src/lib/api-client
2 changes: 1 addition & 1 deletion frontend/.prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
printWidth: 100,
tabWidth: 2,
};
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint src/**/*.{js,jsx}",
"format": "prettier --write ./src",
"generate-client": "openapi --input http://localhost:8888/openapi.json --output ./src/lib/api-client --client fetch --name ApiClient --useOptions"
},
"browserslist": [
Expand Down

0 comments on commit 177c178

Please sign in to comment.