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
5 changes: 5 additions & 0 deletions .changeset/fast-singers-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lazy-release/changesets": chore
---

Setup linter
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand All @@ -26,6 +29,22 @@ jobs:
- name: Format
run: bun fmt:check

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v6

- uses: oven-sh/setup-bun@v2
with:
bun-version-file: ".bun-version"

- name: Install Dependencies
run: bun install

- name: Lint
run: bun lint

test:
runs-on: ubuntu-latest
steps:
Expand All @@ -44,7 +63,7 @@ jobs:

build:
runs-on: ubuntu-latest
needs: [format, test]
needs: [format, lint, test]
steps:
- name: Checkout Repo
uses: actions/checkout@v6
Expand Down
4 changes: 4 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"ignorePatterns": ["dist/**", "*.test.ts"]
}
39 changes: 39 additions & 0 deletions bun.lock

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

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"changeset": "bun src/index.ts",
"build": "bun build ./src/index.ts --outdir ./dist --target node",
"fmt": "oxfmt",
"fmt:check": "oxfmt --check"
"fmt:check": "oxfmt --check",
"lint": "oxlint --type-aware --type-check",
"lint:fix": "oxlint --fix"
},
"dependencies": {
"@clack/prompts": "^0.10.1",
Expand All @@ -27,8 +29,11 @@
"tinyglobby": "^0.2.13"
},
"devDependencies": {
"@types/bun": "^1.3.6",
"@types/node": "^22.15.15",
"oxfmt": "^0.26.0",
"oxlint": "^1.41.0",
"oxlint-tsgolint": "^0.11.1",
"typescript": "^5.8.3"
},
"packageManager": "bun@1.3.6"
Expand Down
2 changes: 1 addition & 1 deletion src/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ function getGitHubRepoInfo(): { owner: string; repo: string } {
}

throw new Error("Could not parse GitHub repository URL");
} catch (error) {
} catch {
throw new Error("Could not determine GitHub repository owner and name from git remote");
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import pc from "picocolors";
import { execSync } from "node:child_process";
import { detect } from "package-manager-detector";
import { readConfig } from "./config.js";
import type { ChangesetType } from "./changeset.js";

export interface ChangesetReleaseType {
type: "major" | "minor" | "patch";
Expand Down Expand Up @@ -167,7 +166,6 @@ export function generateChangelog(
}

export async function version({ dryRun = false, ignore = [] as string[], install = false } = {}) {
const config = readConfig();
const changesetDir = path.join(process.cwd(), ".changeset");

if (!existsSync(changesetDir)) {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"declaration": true
"declaration": true,
"types": ["bun-types"]
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
Expand Down