Skip to content

Commit

Permalink
Add linters (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome authored May 31, 2024
1 parent d33b92e commit 96aeced
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 18 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 4
indent_style = tab

[*.{md,yml,yaml}]
indent_size = 2
indent_style = space
25 changes: 24 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- main

jobs:

lint:
runs-on: ubuntu-latest
steps:
Expand All @@ -18,3 +17,27 @@ jobs:
npm run format-check
- run: |
npm run lint
actionlint:
name: Actionlint
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- uses: reviewdog/action-actionlint@v1
with:
actionlint_flags: -shellcheck ""

markdown-lint:
name: Markdown Lint
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- uses: DavidAnson/markdownlint-cli2-action@v16
with:
config: .markdownlint-cli2.yaml
globs: '**/*.md'
fix: false
18 changes: 18 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Rule configuration.
# For rule descriptions and how to fix: https://github.com/DavidAnson/markdownlint/tree/main#rules--aliases
config:
ul-style:
style: dash
no-duplicate-heading:
siblings_only: true
line-length:
line_length: 500
code_blocks: false
tables: false

# Define glob expressions to ignore
ignores:
- '.github/**'

# Fix any fixable errors
fix: true
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,35 @@ jobs:
with:
minor-label: 'enhancement'
major-label: 'change'

```
## Inputs
| Name | Type | Description |
| --- | --- | --- |
| `github-token` | `string` | The GitHub token to use for the release. (default `github.token`) |
| `minor-label` | `string` | The label to use for minor releases. (default `enhancement`) |
| `major-label` | `string` | The label to use for major releases. (default `change`) |
| `notes-header` | `string` | The header to use for the release notes. |
| `notes-footer` | `string` | The footer to use for the release notes. |
| `variables` | `list` | A list of variables to use in the header and footer. |
| `publish` | `boolean` | Whether to publish the release. (default `false`) |
| Name | Type | Description |
| -------------- | --------- | ----------------------------------------------------------------- |
| `github-token` | `string` | The GitHub token to use for the release. (default `github.token`) |
| `minor-label` | `string` | The label to use for minor releases. (default `enhancement`) |
| `major-label` | `string` | The label to use for major releases. (default `change`) |
| `notes-header` | `string` | The header to use for the release notes. |
| `notes-footer` | `string` | The footer to use for the release notes. |
| `variables` | `list` | A list of variables to use in the header and footer. |
| `publish` | `boolean` | Whether to publish the release. (default `false`) |

## Outputs

| Name | Type | Description |
| --- | --- | --- |
| `version` | `string` | The version number of the next release. |
| `previous-version` | `string` | The version number of the previous release. |
| `release-id` | `string` | The ID of the next release. |
| `release-notes` | `string` | The release notes of the next release. |
| `release-url` | `string` | The URL of the next release. |
| Name | Type | Description |
| ------------------ | -------- | ------------------------------------------------------------------------------------ |
| `version` | `string` | The version number of the next release. |
| `previous-version` | `string` | The version number of the previous release. |
| `release-id` | `string` | The ID of the next release. |
| `release-notes` | `string` | The release notes of the next release. |
| `release-url` | `string` | The URL of the next release. |
| `release-sections` | `string` | A JSON output containing the release sections and the pull requests in each section. |

## Header and Footer

The header and footer have four special placeholders that will be replaced with the version number of the next release:

- `{{version}}` will be replaced with the version number of the next release.
- `{{version-number}}` will be replaced with the version number of the next release without the `v` prefix.
- `{{previous-version}}` will be replaced with the version number of the previous release.
Expand Down

0 comments on commit 96aeced

Please sign in to comment.