Skip to content

Commit

Permalink
Merge pull request #18 from RightCapitalHQ/feature/add-prettier
Browse files Browse the repository at this point in the history
Feature/add prettier to the project
  • Loading branch information
liby authored Nov 10, 2023
2 parents 42295e1 + ee3519a commit 3336b8f
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 23 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
cache: "pnpm"
cache: 'pnpm'

- name: 📦 Install dependencies
run: pnpm install

- name: 🎨 Lint project
run: pnpm run lint

- name: 🧪 Test project
run: pnpm test
run: pnpm test
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ A [shareable config preset](https://docs.renovatebot.com/config-presets/) for Re

## Usage

Enable Renovate in your repository and just `extends` in *renovate.json*.
Enable Renovate in your repository and just `extends` in _renovate.json_.

```json
{
"extends": [
"github>RightCapitalHQ/renovate-config"
]
"extends": ["github>RightCapitalHQ/renovate-config"]
}
```

> [!NOTE]
> You don't have to do `npm i -D @RightCapitalHQ/renovate-config`. Renovate fetches it from this GitHub repo automatically.
Expand All @@ -33,4 +32,4 @@ Enable Renovate in your repository and just `extends` in *renovate.json*.

## License

[MIT License](https://opensource.org/licenses/MIT)
[MIT License](https://opensource.org/licenses/MIT)
15 changes: 3 additions & 12 deletions default.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"automergeType": "pr",
"description": "Default config for RightCapital repositories",
"extends": [
"config:recommended",
":pinAllExceptPeerDependencies"
],
"labels": [
"renovate"
],
"extends": ["config:recommended", ":pinAllExceptPeerDependencies"],
"labels": ["renovate"],
"npm": {
"commitMessageTopic": "{{prettyDepType}} {{depName}}"
},
Expand All @@ -21,11 +16,7 @@
}
],
"platformAutomerge": true,
"postUpdateOptions": [
"npmDedupe",
"pnpmDedupe",
"yarnDedupeFewer"
],
"postUpdateOptions": ["npmDedupe", "pnpmDedupe", "yarnDedupeFewer"],
"prCreation": "immediate",
"rangeStrategy": "auto"
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
"url": "https://github.com/RightCapitalHQ/renovate-config/issues"
},
"scripts": {
"lint": "prettier -c .",
"fix": "prettier -w .",
"validate": "renovate-config-validator --strict default.json",
"test": "pnpm run validate",
"prepare": "pnpm run test"
},
"devDependencies": {
"@rightcapital/prettier-config": "6.0.4",
"prettier": "3.0.3",
"renovate": "latest"
},
"packageManager": "[email protected]"
Expand Down
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

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

1 change: 1 addition & 0 deletions prettier.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@rightcapital/prettier-config');
6 changes: 2 additions & 4 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>RightCapitalHQ/renovate-config"
]
}
"extends": ["github>RightCapitalHQ/renovate-config"]
}

0 comments on commit 3336b8f

Please sign in to comment.