Skip to content

Commit

Permalink
Apply formatter to root-level directories
Browse files Browse the repository at this point in the history
  • Loading branch information
SeiyaKobayashi committed Aug 21, 2024
1 parent ecabcf5 commit 9d49546
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<!-- Provide a detailed description of the changes -->

-
-

## 📚 References

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
- main
- develop
paths:
- "packages/core/**"
- ".github/workflows/check-core.yml"
- 'packages/core/**'
- '.github/workflows/check-core.yml'

defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
- main
- develop
paths:
- "packages/v1/**"
- ".github/workflows/check-v1.yml"
- 'packages/v1/**'
- '.github/workflows/check-v1.yml'

defaults:
run:
Expand Down
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"printWidth": 100,
"semi": true,
"singleQuote": true,
"quoteProps": "consistent",
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "always"
}
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ Monorepo for JPYC Node SDKs.

Please refer to `README`s of each SDK for version specific details.

| SDK | `README` |
|----:|:---------|
| SDK | `README` |
| -----: | :----------------------------------------- |
| `core` | [packages/core](./packages/core/README.md) |
| `v1` | [packages/v1](./packages/v1/README.md) |
| `v1` | [packages/v1](./packages/v1/README.md) |

## 🔨 Development

### Git Submodules

This repo uses [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to be in sync with [JPYCv2](https://github.com/jcam1/JPYCv2/tree/main) repo.
This repo uses [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to be in sync with [JPYCv2](https://github.com/jcam1/JPYCv2/tree/main) repo.

To include submodules when cloning the repo, add `--recursive` option like below.
To include submodules when cloning the repo, add `--recursive` option like below.

```sh
$ git clone --recursive https://github.com/jcam1/sdks.git
Expand All @@ -38,15 +38,15 @@ $ yarn

### Yarn Scripts

To run yarn scripts defined in workspaces, run the following.
To run yarn scripts defined in workspaces, run the following.

```sh
$ yarn workspace <workspace name> run <command name>
```

### Dependencies

To add dependencies, run one of the following. To prevent unexpected behaviors, always pin the exact versions of the dependencies to be installed.
To add dependencies, run one of the following. To prevent unexpected behaviors, always pin the exact versions of the dependencies to be installed.

```sh
# Add dependencies to the specified workspace
Expand Down
23 changes: 17 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,34 @@
"packages/*"
],
"scripts": {
"prepare": "husky"
"prepare": "husky",
"format": "prettier --write",
"format:dry-run": "prettier --check"
},
"devDependencies": {
"husky": "9.0.11",
"lint-staged": "15.2.9"
"lint-staged": "15.2.9",
"prettier": "3.3.3"
},
"lint-staged": {
"*.{md,json,yml}": [
"yarn run format"
],
".github/**/*.{md,json,yml}": [
"yarn run format"
],
"packages/core/**/*.{ts,js}": [
"yarn workspace @jpyc/sdk-core run lint"
"yarn workspace @jpyc/sdk-core run lint",
"yarn workspace @jpyc/sdk-core run format"
],
"packages/core/**/*.{ts,js,md,json}": [
"packages/core/**/*.{md,json}": [
"yarn workspace @jpyc/sdk-core run format"
],
"packages/v1/**/*.{ts,js}": [
"yarn workspace @jpyc/sdk-v1 run lint"
"yarn workspace @jpyc/sdk-v1 run lint",
"yarn workspace @jpyc/sdk-v1 run format"
],
"packages/v1/**/*.{ts,js,md,json}": [
"packages/v1/**/*.{md,json}": [
"yarn workspace @jpyc/sdk-v1 run format"
]
}
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5252,6 +5252,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a"
integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==

[email protected]:
version "3.3.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105"
integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==

pretty-format@^29.0.0, pretty-format@^29.7.0:
version "29.7.0"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812"
Expand Down
4 changes: 2 additions & 2 deletions yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
npmAlwaysAuth: true
npmAuthToken: "${NODE_AUTH_TOKEN}"
npmPublishRegistry: "https://registry.npmjs.org"
npmAuthToken: '${NODE_AUTH_TOKEN}'
npmPublishRegistry: 'https://registry.npmjs.org'

0 comments on commit 9d49546

Please sign in to comment.