From a29774b4b92d88de513b1dbffcbc7f5add4db885 Mon Sep 17 00:00:00 2001 From: cadamsdev Date: Mon, 19 Jan 2026 21:15:00 -0500 Subject: [PATCH 1/6] setup linter --- bun.lock | 39 +++++++++++++++++++++++++++++++++++++++ package.json | 7 ++++++- tsconfig.json | 3 ++- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/bun.lock b/bun.lock index bf30b39..c4c8aa9 100644 --- a/bun.lock +++ b/bun.lock @@ -13,8 +13,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", }, }, @@ -40,8 +43,40 @@ "@oxfmt/win32-x64": ["@oxfmt/win32-x64@0.26.0", "", { "os": "win32", "cpu": "x64" }, "sha512-m8TfIljU22i9UEIkD+slGPifTFeaCwIUfxszN3E6ABWP1KQbtwSw9Ak0TdoikibvukF/dtbeyG3WW63jv9DnEg=="], + "@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@0.11.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-UJIOFeJZpFTJIGS+bMdFXcvjslvnXBEouMvzynfQD7RTazcFIRLbokYgEbhrN2P6B352Ut1TUtvR0CLAp/9QfA=="], + + "@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@0.11.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-68O8YvexIm+ISZKl2vBFII1dMfLrteDyPcuCIecDuiBIj2tV0KYq13zpSCMz4dvJUWJW6RmOOGZKrkkvOAy6uQ=="], + + "@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@0.11.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-hXBInrFxPNbPPbPQYozo8YpSsFFYdtHBWRUiLMxul71vTy1CdSA7H5Qq2KbrKomr/ASmhvIDVAQZxh9hIJNHMA=="], + + "@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@0.11.1", "", { "os": "linux", "cpu": "x64" }, "sha512-aMaGctlwrJhaIQPOdVJR+AGHZGPm4D1pJ457l0SqZt4dLXAhuUt2ene6cUUGF+864R7bDyFVGZqbZHODYpENyA=="], + + "@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@0.11.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-ipOs6kKo8fz5n5LSHvcbyZFmEpEIsh2m7+B03RW3jGjBEPMiXb4PfKNuxnusFYTtJM9WaR3bCVm5UxeJTA8r3w=="], + + "@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@0.11.1", "", { "os": "win32", "cpu": "x64" }, "sha512-m2apsAXg6qU3ulQG45W/qshyEpOjoL+uaQyXJG5dBoDoa66XPtCaSkBlKltD0EwGu0aoB8lM4I5I3OzQ6raNhw=="], + + "@oxlint/darwin-arm64": ["@oxlint/darwin-arm64@1.41.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-K0Bs0cNW11oWdSrKmrollKF44HMM2HKr4QidZQHMlhJcSX8pozxv0V5FLdqB4sddzCY0J9Wuuw+oRAfR8sdRwA=="], + + "@oxlint/darwin-x64": ["@oxlint/darwin-x64@1.41.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-1LCCXCe9nN8LbrJ1QOGari2HqnxrZrveYKysWDIg8gFsQglIg00XF/8lRbA0kWHMdLgt4X0wfNYhhFz+c3XXLQ=="], + + "@oxlint/linux-arm64-gnu": ["@oxlint/linux-arm64-gnu@1.41.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-Fow7H84Bs8XxuaK1yfSEWBC8HI7rfEQB9eR2A0J61un1WgCas7jNrt1HbT6+p6KmUH2bhR+r/RDu/6JFAvvj4g=="], + + "@oxlint/linux-arm64-musl": ["@oxlint/linux-arm64-musl@1.41.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-WoRRDNwgP5W3rjRh42Zdx8ferYnqpKoYCv2QQLenmdrLjRGYwAd52uywfkcS45mKEWHeY1RPwPkYCSROXiGb2w=="], + + "@oxlint/linux-x64-gnu": ["@oxlint/linux-x64-gnu@1.41.0", "", { "os": "linux", "cpu": "x64" }, "sha512-75k3CKj3fOc/a/2aSgO81s3HsTZOFROthPJ+UI2Oatic1LhvH6eKjKfx3jDDyVpzeDS2qekPlc/y3N33iZz5Og=="], + + "@oxlint/linux-x64-musl": ["@oxlint/linux-x64-musl@1.41.0", "", { "os": "linux", "cpu": "x64" }, "sha512-8r82eBwGPoAPn67ZvdxTlX/Z3gVb+ZtN6nbkyFzwwHWAh8yGutX+VBcVkyrePSl6XgBP4QAaddPnHmkvJjqY0g=="], + + "@oxlint/win32-arm64": ["@oxlint/win32-arm64@1.41.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-aK+DAcckQsNCOXKruatyYuY/ROjNiRejQB1PeJtkZwM21+8rV9ODYbvKNvt0pW+YCws7svftBSFMCpl3ke2unw=="], + + "@oxlint/win32-x64": ["@oxlint/win32-x64@1.41.0", "", { "os": "win32", "cpu": "x64" }, "sha512-dVBXkZ6MGLd3owV7jvuqJsZwiF3qw7kEkDVsYVpS/O96eEvlHcxVbaPjJjrTBgikXqyC22vg3dxBU7MW0utGfw=="], + + "@types/bun": ["@types/bun@1.3.6", "", { "dependencies": { "bun-types": "1.3.6" } }, "sha512-uWCv6FO/8LcpREhenN1d1b6fcspAB+cefwD7uti8C8VffIv0Um08TKMn98FynpTiU38+y2dUO55T11NgDt8VAA=="], + "@types/node": ["@types/node@22.19.5", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-HfF8+mYcHPcPypui3w3mvzuIErlNOh2OAG+BCeBZCEwyiD5ls2SiCwEyT47OELtf7M3nHxBdu0FsmzdKxkN52Q=="], + "bun-types": ["bun-types@1.3.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-OlFwHcnNV99r//9v5IIOgQ9Uk37gZqrNMCcqEaExdkVq3Avwqok1bJFmvGMCkCE0FqzdY8VMOZpfpR3lwI+CsQ=="], + "commander": ["commander@14.0.2", "", {}, "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ=="], "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], @@ -50,6 +85,10 @@ "oxfmt": ["oxfmt@0.26.0", "", { "dependencies": { "tinypool": "2.0.0" }, "optionalDependencies": { "@oxfmt/darwin-arm64": "0.26.0", "@oxfmt/darwin-x64": "0.26.0", "@oxfmt/linux-arm64-gnu": "0.26.0", "@oxfmt/linux-arm64-musl": "0.26.0", "@oxfmt/linux-x64-gnu": "0.26.0", "@oxfmt/linux-x64-musl": "0.26.0", "@oxfmt/win32-arm64": "0.26.0", "@oxfmt/win32-x64": "0.26.0" }, "bin": { "oxfmt": "bin/oxfmt" } }, "sha512-UDD1wFNwfeorMm2ZY0xy1KRAAvJ5NjKBfbDmiMwGP7baEHTq65cYpC0aPP+BGHc8weXUbSZaK8MdGyvuRUvS4Q=="], + "oxlint": ["oxlint@1.41.0", "", { "optionalDependencies": { "@oxlint/darwin-arm64": "1.41.0", "@oxlint/darwin-x64": "1.41.0", "@oxlint/linux-arm64-gnu": "1.41.0", "@oxlint/linux-arm64-musl": "1.41.0", "@oxlint/linux-x64-gnu": "1.41.0", "@oxlint/linux-x64-musl": "1.41.0", "@oxlint/win32-arm64": "1.41.0", "@oxlint/win32-x64": "1.41.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.11.1" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-Dyaoup82uhgAgp5xLNt4dPdvl5eSJTIzqzL7DcKbkooUE4PDViWURIPlSUF8hu5a+sCnNIp/LlQMDsKoyaLTBA=="], + + "oxlint-tsgolint": ["oxlint-tsgolint@0.11.1", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "0.11.1", "@oxlint-tsgolint/darwin-x64": "0.11.1", "@oxlint-tsgolint/linux-arm64": "0.11.1", "@oxlint-tsgolint/linux-x64": "0.11.1", "@oxlint-tsgolint/win32-arm64": "0.11.1", "@oxlint-tsgolint/win32-x64": "0.11.1" }, "bin": { "tsgolint": "bin/tsgolint.js" } }, "sha512-WulCp+0/6RvpM4zPv+dAXybf03QvRA8ATxaBlmj4XMIQqTs5jeq3cUTk48WCt4CpLwKhyyGZPHmjLl1KHQ/cvA=="], + "package-manager-detector": ["package-manager-detector@1.6.0", "", {}, "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA=="], "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], diff --git a/package.json b/package.json index 23b6aa6..f8a4a43 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" diff --git a/tsconfig.json b/tsconfig.json index 970c44b..515fca9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,8 @@ "forceConsistentCasingInFileNames": true, "strict": true, "skipLibCheck": true, - "declaration": true + "declaration": true, + "types": ["bun-types"] }, "include": ["src"], "exclude": ["node_modules", "dist"] From fbc3d0760650d85284e1dd76dba0cfd0af69d622 Mon Sep 17 00:00:00 2001 From: cadamsdev Date: Mon, 19 Jan 2026 21:26:09 -0500 Subject: [PATCH 2/6] setup .oxlintrc --- .oxlintrc.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .oxlintrc.json diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..2b23e30 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,4 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "ignorePatterns": ["dist/**", "*.test.ts"] +} From 8477f7247256a6921652e369fb71297bedb93b3b Mon Sep 17 00:00:00 2001 From: cadamsdev Date: Mon, 19 Jan 2026 21:27:32 -0500 Subject: [PATCH 3/6] fix warnings --- src/publish.ts | 2 +- src/version.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/publish.ts b/src/publish.ts index 2b2bd47..10893d4 100644 --- a/src/publish.ts +++ b/src/publish.ts @@ -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"); } } diff --git a/src/version.ts b/src/version.ts index 5869df2..5b3e252 100644 --- a/src/version.ts +++ b/src/version.ts @@ -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"; @@ -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)) { From bbac31c3984352b8e570267e7794d8ac6e0753f0 Mon Sep 17 00:00:00 2001 From: cadamsdev Date: Mon, 19 Jan 2026 21:27:49 -0500 Subject: [PATCH 4/6] added a changeset --- .changeset/fast-singers-sit.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fast-singers-sit.md diff --git a/.changeset/fast-singers-sit.md b/.changeset/fast-singers-sit.md new file mode 100644 index 0000000..10bcdb9 --- /dev/null +++ b/.changeset/fast-singers-sit.md @@ -0,0 +1,5 @@ +--- +"@lazy-release/changesets": chore +--- + +Setup linter From 4d05a27dabde72e319088c10bbe62537f380597b Mon Sep 17 00:00:00 2001 From: cadamsdev Date: Mon, 19 Jan 2026 21:28:38 -0500 Subject: [PATCH 5/6] run lint in ci workflow --- .github/workflows/ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b04efe..79c0ea6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,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: @@ -44,7 +60,7 @@ jobs: build: runs-on: ubuntu-latest - needs: [format, test] + needs: [format, lint, test] steps: - name: Checkout Repo uses: actions/checkout@v6 From 9dcf2e6afcae6afcc9accd51739f126e7458148e Mon Sep 17 00:00:00 2001 From: cadamsdev Date: Mon, 19 Jan 2026 21:29:01 -0500 Subject: [PATCH 6/6] wip --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79c0ea6..850e82c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,9 @@ name: CI on: + push: + branches: + - main pull_request: branches: - main