Skip to content

Commit

Permalink
add central formatter tool
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanEwen committed Feb 29, 2024
1 parent 61edd5a commit 8dc0156
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .tools/typescript_formatter/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/node_modules
**/dist
**/src/generated
*.d.ts
6 changes: 6 additions & 0 deletions .tools/typescript_formatter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# TypeScript Examples formatter

Use this to format all typescript example files by running
- `npm run format-basics`
- `npm run format-patterns`
- or `npm run format-all`
14 changes: 14 additions & 0 deletions .tools/typescript_formatter/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "typescript-examples-formatter",
"version": "1.0.0",
"description": "Formatter for typescript projects",
"private": true,
"scripts": {
"format-basics": "prettier --ignore-path .prettierignore --print-width 100 --write \"./../../basics/**/*.ts\"",
"format-patterns": "prettier --ignore-path .prettierignore --print-width 100 --write \"./../../**/patterns-use-cases/**/*.ts\"",
"format-all": "npm run format-basics && npm run format-patterns"
},
"devDependencies": {
"prettier": "^2.8.4"
}
}

0 comments on commit 8dc0156

Please sign in to comment.