Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .changeset/reorganize-tests.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
"@ankhorage/devtools": patch
'@ankhorage/devtools': patch
---

Reorganize tests and update configuration:

- Move test files from `tests/` to `src/` to follow project standards.
- Update `tsconfig.json` to exclude `*.test.ts` from build output.
- Update `tsconfig.test.json` to include `*.test.ts` for linting and IDE support.
Expand Down
5 changes: 5 additions & 0 deletions .changeset/standard-bun-workflows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ankhorage/devtools': patch
---

Standardize CI/release workflow files and update the Bun tooling baseline.
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.13'

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run build
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.build ? 0 : 1)"; then
bun run build
else
echo "No build script found; skipping."
fi

- name: Run lint
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.lint ? 0 : 1)"; then
bun run lint
else
echo "No lint script found; skipping."
fi

- name: Run format check
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.['format:check'] ? 0 : 1)"; then
bun run format:check
else
echo "No format:check script found; skipping."
fi

- name: Run tests
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.test ? 0 : 1)"; then
bun run test
else
echo "No test script found; skipping."
fi

- name: Run typecheck
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.typecheck ? 0 : 1)"; then
bun run typecheck
else
echo "No typecheck script found; skipping."
fi

- name: Check changesets
if: github.event_name == 'pull_request'
run: |
if [ -f ./scripts/check-changeset-status.sh ]; then
bash ./scripts/check-changeset-status.sh
else
echo "No changeset status script found; skipping."
fi
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write
id-token: write

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.13'

- name: Setup Node for npm publishing
uses: actions/setup-node@v4
with:
node-version: 24
registry-url: https://registry.npmjs.org

- name: Update npm
run: npm install -g npm@latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build package
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.build ? 0 : 1)"; then
bun run build
else
echo "No build script found; skipping."
fi

- name: Create release pull request or publish to npm
if: hashFiles('.changeset/config.json') != ''
uses: changesets/action@v1
with:
version: bun run version-packages
publish: bunx changeset publish
commit: Version Packages
title: Version Packages
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Skip release
if: hashFiles('.changeset/config.json') == ''
run: echo "No Changesets config found; skipping release."
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
Shared ESLint and Prettier configuration for modern TypeScript projects.

## What you get

- Consistent linting across repos
- Zero-config Prettier setup
- Strict TypeScript rules without compromise
- One source of truth for tooling

## Features

- Flat ESLint config (latest standard)
- Preconfigured plugin ecosystem
- Prettier integration
Expand All @@ -25,9 +27,9 @@ bun add -D @ankhorage/devtools
### ESLint

```js
import config from '@ankhorage/devtools/eslint'
import config from '@ankhorage/devtools/eslint';

export default config()
export default config();
```

### Prettier
Expand All @@ -39,13 +41,15 @@ export default config()
```

## Use Cases

- Monorepos with shared standards
- Teams that want strict, predictable linting
- Projects avoiding duplicated config

## Why this exists

Maintaining ESLint + Prettier configs across multiple repositories leads to:

- duplication
- inconsistency
- drift over time
Expand All @@ -55,9 +59,11 @@ This package centralizes tooling so all projects stay aligned.
## Scope

Includes:

- ESLint configuration
- Prettier configuration

Excludes:

- runtime code
- build tooling
6 changes: 4 additions & 2 deletions bun.lock

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

16 changes: 13 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"name": "@ankhorage/devtools",
"version": "1.0.1",
"description": "Shared Lint and Format Configuration for Ankhorage",
"homepage": "https://github.com/ankhorage/devtools#readme",
"bugs": {
"url": "https://github.com/ankhorage/devtools/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ankhorage/devtools.git"
},
"type": "module",
"publishConfig": {
"access": "public"
Expand All @@ -26,7 +34,8 @@
"lint": "eslint .",
"format": "prettier --write .",
"format:check": "prettier --check .",
"test": "bun test"
"test": "bun test",
"version-packages": "changeset version"
},
"dependencies": {
"@eslint/js": "^10.0.1",
Expand All @@ -41,8 +50,9 @@
},
"devDependencies": {
"@changesets/cli": "^2.30.0",
"@types/bun": "^1.3.13",
"@types/node": "^25.2.3",
"bun-types": "^1.3.11",
"typescript": "^5.9.3"
}
},
"packageManager": "bun@1.3.13"
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"types": ["bun-types"]
"types": ["bun"]
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"]
Expand Down
Loading