Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ assignees: ''

### Environment

* **OS**:
* **Version**:
* **OS**:
* **Version**:

### Problem

Expand Down
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ labels: enhancement
assignees: ''

---


4 changes: 1 addition & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<!-- Describe the changes made in the PR. -->

-
-
-
-
-
Expand All @@ -21,5 +21,3 @@
<!-- If this PR closes any issues, use the keyword 'closes' followed by the issue number -->

Closes # Fixes #


41 changes: 0 additions & 41 deletions .github/workflows/bun.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Pre-commit

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch: {}

jobs:
pre-commit:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true

- name: Set up Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install

- name: Install pre-commit
run: |
pip install pre-commit
pre-commit install -f
pre-commit install --hook-type commit-msg

- name: Run pre-commit on all files
run: pre-commit run --all-files
42 changes: 0 additions & 42 deletions .github/workflows/rust.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# dependency directories
node_modules/
.venv/

# Build output
dist/
Expand Down Expand Up @@ -58,7 +59,7 @@ TODO.md
# claude local settings
.claude/settings.local.json

# Tauri gen files
# Tauri gen files
src-tauri/gen/
apps/desktop/src-tauri/gen/
**/src-tauri/gen/
52 changes: 52 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Pre-commit hooks configuration for Rust + TypeScript/React project
# See https://pre-commit.com for more information

repos:
# Rust hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-json
exclude: 'tsconfig.*\.json$'
- id: check-merge-conflict

# Rust formatting only (clippy/check too heavy for CI)
- repo: local
hooks:
- id: rust-fmt-workspace
name: Rust format (workspace)
entry: cargo fmt
args: ['--all', '--check']
language: system
files: '\.rs$'
pass_filenames: false

# TypeScript/JavaScript with Biome and type checking
- repo: local
hooks:
- id: typescript-check
name: TypeScript check
entry: bun
args: ['typecheck']
language: system
files: \.(ts|tsx)$
pass_filenames: false
- id: biome-check
name: Biome check
entry: bun
args: ['check', '--write']
language: system
files: \.(js|jsx|ts|tsx|json)$
pass_filenames: false

# Commit message validation
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.18.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/cli']
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bun 1.1.29
nodejs 22.11.0
nodejs 22.11.0
python 3.8
31 changes: 24 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Welcome! We're happy to have you here. Thank you in advance for your contributio

Note: Please check existing issues and pull requests before creating a new one.

# The Basics
## The Basics

Athas welcomes contributions in the form of pull requests.

Expand All @@ -14,20 +14,35 @@ For larger changes (e.g., new lint rules, new functionality, new configuration o

If you have suggestions on how we might improve the contributing documentation, let us know!

# Prerequisites
## Prerequisites

Athas is a Tauri project using Bun as package manager and Biome for linting/formatting.

- [Rust](https://rustup.rs) with `cargo`, `rustfmt`, and `clippy`
- [Tauri CLI](https://tauri.app) → `cargo install tauri-cli`
- [Bun](https://bun.sh) as package manager
- [Node.js ≥ 18](https://nodejs.org)
- [Node.js ≥ 20.19.0](https://nodejs.org)
- [Python 3.8+](https://www.python.org/downloads/) for `pre-commit` hooks

Check with: `node -v`, `cargo --version`, `tauri --version`, `bun --version`

# Development
## Development

After cloning the repository, run Athas locally from the repository root with:
After cloning the repository, install `pre-commit` hooks. It's really important to ensure code quality and consistency across contributions.

```bash
pip install pre-commit
pre-commit install -f
pre-commit install --hook-type commit-msg
```

Test the hooks to ensure they are working correctly:

```bash
pre-commit run --all-files
```

Then, install project dependencies, and run development server:

```bash
bun install
Expand All @@ -51,18 +66,20 @@ Available commands:
- `bun run check` - Run both typecheck and biome check
- `bun run fix` - Auto-fix formatting and linting issues

# Pull Request Guidelines
## Pull Request Guidelines

## Commit History
### Commit History

To maintain a clean commit history:

1. **Squash commits** into logical, compact commits before opening your PR
2. **Rebase on origin/master** to avoid merge conflicts:

```bash
git fetch origin
git rebase origin/master
```

3. Each commit should represent a single logical change
4. Use descriptive commit messages following conventional commits format

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -676,4 +676,4 @@ specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
3 changes: 0 additions & 3 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.7.0",
"concurrently": "^9.2.0",
"simple-git-hooks": "^2.13.0",
"typescript": "^5.8.3",
"typescript-language-server": "^4.3.4",
"vite": "^7.0.5",
Expand Down Expand Up @@ -681,8 +680,6 @@

"shell-quote": ["[email protected]", "", {}, "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw=="],

"simple-git-hooks": ["[email protected]", "", { "bin": { "simple-git-hooks": "cli.js" } }, "sha512-N+goiLxlkHJlyaYEglFypzVNMaNplPAk5syu0+OPp/Bk6dwVoXF6FfOw2vO0Dp+JHsBaI+w6cm8TnFl2Hw6tDA=="],

"simple-swizzle": ["[email protected]", "", { "dependencies": { "is-arrayish": "^0.3.1" } }, "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg=="],

"sisteransi": ["[email protected]", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ bun install

# Start development server
bun run tauri dev
```
```
2 changes: 1 addition & 1 deletion docs/develop/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ bun install

# Start development server
bun run tauri dev
```
```
7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
"check:all": "bun typecheck && bun lint",
"check:fix": "biome check --write --unsafe",
"clean": "concurrently --names \"node,rust\" --prefix-colors \"cyan,yellow\" \"rimraf dist build node_modules bun.lockb && bun install\" \"cargo clean && cargo build\"",
"prepare": "simple-git-hooks",
"commitlint": "commitlint --edit",
"setup": "chmod +x scripts/linux/setup.sh && ./scripts/linux/setup.sh",
"setup:linux": "chmod +x scripts/linux/setup.sh && ./scripts/linux/setup.sh",
"setup-win": "./scripts/windows/setup.ps1",
Expand Down Expand Up @@ -61,15 +59,10 @@
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.7.0",
"concurrently": "^9.2.0",
"simple-git-hooks": "^2.13.0",
"typescript": "^5.8.3",
"typescript-language-server": "^4.3.4",
"vite": "^7.0.5"
},
"simple-git-hooks": {
"pre-commit": "bun check:all",
"commit-msg": "bun commitlint --edit $1"
},
"lint-staged": {
"*.{ts,tsx,js,jsx,json}": [
"biome check --no-errors-on-unmatched"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/terminal.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@

// Terminal-related commands
Loading
Loading