Skip to content

Commit

Permalink
chore: init trunk (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfoxtyler authored Jan 3, 2025
1 parent ecb1b02 commit f03e9b7
Show file tree
Hide file tree
Showing 26 changed files with 396 additions and 351 deletions.
20 changes: 7 additions & 13 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.
**Describe the bug** A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
**To Reproduce** Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.
**Expected behavior** A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
**Screenshots** If applicable, add screenshots to help explain your problem.

**Environment**

- OS: [e.g. macOS, Windows, Ubuntu]
- Language [e.g. AssemblyScript, Go]
- Version [e.g. v0.xx]

**Additional context**
Add any other context about the problem here.
**Additional context** Add any other context about the problem here.
21 changes: 9 additions & 12 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Is your feature request related to a problem? Please describe.** A clear and concise description
of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe the solution you'd like** A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Describe alternatives you've considered** A clear and concise description of any alternative
solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
**Additional context** Add any other context or screenshots about the feature request here.
4 changes: 4 additions & 0 deletions .github/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
self-hosted-runner:
# Labels of self-hosted runner in array of string
labels:
- warp-ubuntu-latest-x64-2x
15 changes: 10 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ Please explain the changes you made here.

- [ ] Code compiles correctly and linting passes locally
- [ ] Tests added for new functionality, or regression tests for bug fixes added as applicable
- [ ] For new features, etc., PR on [docs repo](https://github.com/hypermodeinc/docs) staged and linked here
- [ ] For new features, etc., PR on [docs repo](https://github.com/hypermodeinc/docs) staged and
linked here

**Instructions**

- The PR title should follow the [Conventional Commits](https://www.conventionalcommits.org/) syntax, leading with `fix:`, `feat:`, `chore:`, `ci:`, etc.
- The description should briefly explain what the PR is about. In the case of a bugfix, describe or link to the bug.
- The PR title should follow the [Conventional Commits](https://www.conventionalcommits.org/)
syntax, leading with `fix:`, `feat:`, `chore:`, `ci:`, etc.
- The description should briefly explain what the PR is about. In the case of a bugfix, describe or
link to the bug.
- In the checklist section, check the boxes in that are applicable, using `[x]` syntax.
- If not applicable, remove the entire line. Only leave the box unchecked if you intend to come back and check the box later.
- Delete the `Instructions` line and everything below it, to indicate you have read and are following these instructions. 🙂
- If not applicable, remove the entire line. Only leave the box unchecked if you intend to come
back and check the box later.
- Delete the `Instructions` line and everything below it, to indicate you have read and are
following these instructions. 🙂

Thank you for your contribution to the Modus project!
5 changes: 5 additions & 0 deletions .github/workflows/ci-cli-lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: ci-cli-lint

on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
name: "Release CLI"
name: Release CLI

on:
push:
tags:
- "v*"
- v*

permissions:
contents: "write"
contents: write
id-token: write

jobs:
release:
# note: must use GitHub-hosted runner for publishing to NPM with --provenance flag
runs-on: ubuntu-latest
name: Release
steps:
- name: "Validate version"
- name: Validate version
if: ${{ !startsWith(github.ref_name, 'v') }}
run: 'echo "Hyp CLI version must start with `v` && exit 1'
run: echo "Hyp CLI version must start with `v` && exit 1
- uses: actions/checkout@v4
with:
ref: "${{ github.ref_name }}"
Expand All @@ -27,15 +30,17 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ">=22"
registry-url: "https://registry.npmjs.org"
registry-url: https://registry.npmjs.org
- name: Prepare Release
run: npm version ${{ steps.parse_cli_version.outputs.cli_version }} --no-git-tag-version
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish NPM Package
run: npm publish --provenance --access public --tag ${{ steps.parse_cli_version.outputs.npm_tag }}
run:
npm publish --provenance --access public --tag ${{ steps.parse_cli_version.outputs.npm_tag
}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release
Expand All @@ -56,7 +61,7 @@ jobs:
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
wranglerVersion: "3.83.0"
wranglerVersion: 3.83.0
preCommands: |
cat install.sh
command: |
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
oclif.manifest.json
tsconfig.tsbuildinfo



yarn.lock
pnpm-lock.yaml

Expand All @@ -25,4 +23,4 @@ oclif.manifest.json
yarn.lock
pnpm-lock.yaml
bun.lockb
rt/
rt/
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

9 changes: 9 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*out
*logs
*actions
*notifications
*tools
plugins
user_trunk.yaml
user.yaml
tmp
8 changes: 8 additions & 0 deletions .trunk/configs/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"line-length": { "line_length": 150, "tables": false },
"no-inline-html": false,
"no-bare-urls": false,
"no-space-in-emphasis": false,
"no-emphasis-as-heading": false,
"first-line-heading": false
}
6 changes: 6 additions & 0 deletions .trunk/configs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"proseWrap": "always",
"printWidth": 100,
"singleQuote": false
}
7 changes: 7 additions & 0 deletions .trunk/configs/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
enable=all
source-path=SCRIPTDIR
disable=SC2154

# If you're having issues with shellcheck following source, disable the errors via:
# disable=SC1090
# disable=SC1091
7 changes: 7 additions & 0 deletions .trunk/configs/.yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rules:
quoted-strings:
required: only-when-needed
extra-allowed: ["{|}"]
key-duplicates: {}
octal-values:
forbid-implicit-octal: true
File renamed without changes.
38 changes: 38 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
version: 1.22.8
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
- id: trunk
ref: v1.6.6
uri: https://github.com/trunk-io/plugins
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
enabled:
- [email protected]
- [email protected]
- [email protected]
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
enabled:
- [email protected]
- [email protected]
- [email protected]
- git-diff-check
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
actions:
enabled:
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
- trunk-upgrade-available
7 changes: 1 addition & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"DavidAnson.vscode-markdownlint",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
]
"recommendations": ["trunk.io"]
}
6 changes: 1 addition & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
"name": "Execute Command",
"skipFiles": ["<node_internals>/**"],
"runtimeExecutable": "node",
"runtimeArgs": [
"--loader",
"ts-node/esm",
"--no-warnings=ExperimentalWarning"
],
"runtimeArgs": ["--loader", "ts-node/esm", "--no-warnings=ExperimentalWarning"],
"program": "${workspaceFolder}/bin/dev.js",
"args": ["hello", "world"]
}
Expand Down
22 changes: 3 additions & 19 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
{
"cSpell.flagWords": ["teh", "hte"],
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.associations": {
"CODEOWNERS": "plaintext",
"LICENSE": "plaintext"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
"editor.defaultFormatter": "trunk.io",
"editor.trimAutoWhitespace": true,
"trunk.autoInit": false
}
Loading

0 comments on commit f03e9b7

Please sign in to comment.