Skip to content

Commit

Permalink
Adds Prettier to the project
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardovdheijden committed Jun 3, 2024
1 parent 387169d commit f0bedfe
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
run: npm ci
- run: npm run tsc
- run: npm run lint
- run: npm run prettier

unit-tests:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Add files here to ignore them from prettier formatting

/coverage
/mkdocs

.next
node_modules
17 changes: 17 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"importOrder": [
"^react",
"^react-native",
"^[a-zA-Z]",
"^@?\\w",
"^@/?\\w",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"tabWidth": 4
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"prettier": "prettier -c \"{**/*,*}.{ts,tsx,json,js,md}\"",
"prettier-fix": "prettier --write \"{**/*,*}.{ts,tsx,json,js,md}\"",
"prepare": "husky"
},
"dependencies": {
Expand Down

0 comments on commit f0bedfe

Please sign in to comment.