-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(web): add IDE document #390
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [actionlint] reported by reviewdog 🐶
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [actionlint] reported by reviewdog 🐶 commitlint-rs/.github/workflows/release.yaml Line 146 in 7187583
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,8 @@ Cargo.lock | |
commitlint | ||
|
||
# Commitlint config file | ||
.commitlintrc | ||
.commitlintrc.* | ||
|
||
# JSON schema | ||
schema.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
title: IDE | ||
description: Guide how to setup your IDE to work with commitlint | ||
--- | ||
|
||
Commitlint offers schema by supporting [JSON schema](https://json-schema.org/) so that you can configure your IDE to work with Commitlint and have better developer experience. | ||
|
||
:::tip | ||
|
||
If you want to pin the schema to a specific version, you can configure the version in the URL. | ||
|
||
```console | ||
https://github.com/KeisukeYamashita/commitlint-rs/releases/download/v0.2.0/schema.json | ||
``` | ||
|
||
In this case, the schema is pinned to version `0.2.0`. | ||
|
||
::: | ||
|
||
## Visual Studio Code | ||
|
||
Configure your [Visual Studio Code](https://code.visualstudio.com/) to work with Commitlint. | ||
|
||
### Edit in `settings.json` | ||
|
||
Update your user `settings.json` or workspace settings (`/.vscode/settings.json`) to configure the schema. | ||
|
||
#### JSON | ||
|
||
```json | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": [ | ||
".commitlintrc", | ||
".commitlintrc.json" | ||
], | ||
"url": "https://github.com/KeisukeYamashita/commitlint-rs/releases/latest/download/schema.json" | ||
} | ||
] | ||
``` | ||
|
||
#### YAML | ||
|
||
Associating schemas with YAMLs are supported by the [YAML language server](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml). | ||
|
||
```json | ||
"yaml.schemas": { | ||
"https://github.com/KeisukeYamashita/commitlint-rs/releases/latest/download/schema.json": [ | ||
".commitlintrc", | ||
".commitlintrc.yaml", | ||
".commitlint.yml" | ||
] | ||
} | ||
``` | ||
|
||
### Specify schema in the configuration file | ||
|
||
```json | ||
{ | ||
"$schema": "https://github.com/KeisukeYamashita/commitlint-rs/releases/download/v0.2.0/schema.json", | ||
"rules": {} | ||
} | ||
``` | ||
|
||
#### JSON | ||
|
||
Add the following comment in your `.commitlintrc` or `.commitlintrc.json` file. | ||
|
||
```json | ||
{ | ||
"$schema": "https://github.com/KeisukeYamashita/commitlint-rs/releases/latest/download/schema.json", | ||
"rules": {} | ||
} | ||
``` | ||
|
||
#### YAML | ||
|
||
Associating schemas with YAMLs are supported by the [YAML language server](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml). Add the following comment in your `.commitlintrc`, `.commitlintrc.yaml` or `.commitlintrc.yml` file. | ||
|
||
```yaml | ||
# yaml-language-server: $schema=https://github.com/KeisukeYamashita/commitlint-rs/releases/latest/download/schema.json | ||
rules: | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[actionlint] reported by reviewdog 🐶
the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
commitlint-rs/.github/workflows/release.yaml
Line 52 in 7187583