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
10 changes: 10 additions & 0 deletions .changeset/beige-icons-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@kin0992/prettier-config': patch
'@kin0992/eslint-config': patch
'@kin0992/vitest-config': patch
'@kin0992/tsconfig': patch
'@kin0992/skills': patch
'dev-toolkit-infra': patch
---

Format code using new code style rules
2 changes: 1 addition & 1 deletion .changeset/nine-worlds-teach.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"dev-toolkit-infra": patch
'dev-toolkit-infra': patch
---

Upgrade the GitHub package of Pulumi
5 changes: 5 additions & 0 deletions .changeset/sweet-ghosts-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@kin0992/oxc-config': minor
---

Create new oxlint and oxformat configuration to share across projects
5 changes: 5 additions & 0 deletions .changeset/tidy-worms-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@kin0992/oxc-config': minor
---

Add a shared OXC config package, wire the monorepo to shared `oxfmt` and `oxlint` configs, and document the new consumer setup while keeping the legacy `@kin0992/prettier-config` package available.
10 changes: 0 additions & 10 deletions .oxfmtrc.json

This file was deleted.

32 changes: 29 additions & 3 deletions CONSUMING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ Locally, generate a Personal Access Token with `read:packages` and put it in `~/
```sh
pnpm add -D \
@kin0992/tsconfig \
@kin0992/oxc-config \
@kin0992/eslint-config \
@kin0992/prettier-config \
@kin0992/vitest-config
@kin0992/vitest-config \
oxfmt \
oxlint
```

### Wire them up
Expand All @@ -142,10 +144,30 @@ import config from '@kin0992/eslint-config';
export default config;
```

`oxfmt.config.ts`:

```ts
import config from '@kin0992/oxc-config/oxfmt';
export default config;
```

`oxlint.config.ts`:

```ts
import config from '@kin0992/oxc-config/oxlint';
export default config;
```

`package.json`:

```json
{ "prettier": "@kin0992/prettier-config" }
{
"scripts": {
"format": "oxfmt",
"format:check": "oxfmt --check",
"lint:oxlint": "oxlint ."
}
}
```

`vitest.config.ts`:
Expand All @@ -162,6 +184,10 @@ pnpm add -D @kin0992/skills

Skills live as `SKILL.md` files under `node_modules/@kin0992/skills/src/<name>/SKILL.md` and can be loaded by your AI tooling of choice.

### Legacy formatter package

`@kin0992/prettier-config` is still available for existing consumers, but new projects should prefer `@kin0992/oxc-config`.

---

## 3. Recommended consumer workflow setup
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ Platform Engineering toolkit: reusable GitHub Actions, AI Skills, and shared Typ
| `.github/workflows/iac-drift.yml` | Reusable workflow: Pulumi drift detection |
| `.github/actions/setup` | Composite action: Node + pnpm + cache |
| `packages/tsconfig` | `@kin0992/tsconfig` — base / node / library presets |
| `packages/oxc-config` | `@kin0992/oxc-config` — shared OXC format + lint config |
| `packages/eslint-config` | `@kin0992/eslint-config` — flat ESLint config for TS |
| `packages/prettier-config` | `@kin0992/prettier-config` — shared Prettier config |
| `packages/prettier-config` | `@kin0992/prettier-config` — legacy Prettier config |
| `packages/vitest-config` | `@kin0992/vitest-config` — shared Vitest preset |
| `packages/skills` | `@kin0992/skills` — AI Skills (commit, PR, review, changelog) |

## Stack

Node.js LTS · TypeScript · pnpm workspaces · Turbo · Vitest · Pulumi (TS) · Changesets · GitHub Actions · GitHub Packages registry
Node.js LTS · TypeScript · pnpm workspaces · Turbo · OXC (`oxfmt`, `oxlint`) · Vitest · Pulumi (TS) · Changesets · GitHub Actions · GitHub Packages registry

## How to consume from another project

Expand Down
3 changes: 3 additions & 0 deletions infra/oxfmt.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@kin0992/oxc-config/oxfmt';

export default config;
13 changes: 13 additions & 0 deletions infra/oxlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import config from '@kin0992/oxc-config/oxlint';

export default {
...config,
options: {
reportUnusedDisableDirectives: 'error',
},
rules: {
...config.rules,
'no-new': 'off',
},
overrides: [...(config.overrides || [])],
};
9 changes: 7 additions & 2 deletions infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
"scripts": {
"build": "tsc --noEmit",
"typecheck": "tsc --noEmit",
"lint": "echo 'no lint configured for infra'",
"format:check": "oxfmt --check",
"format": "oxfmt --config oxfmt.config.mjs",
"format:check": "oxfmt --check --config oxfmt.config.mjs",
"lint": "oxlint -c oxlint.config.mjs --fix",
"lint:check": "oxlint -c oxlint.config.mjs",
"test": "echo 'no infra tests'",
"preview": "pulumi preview",
"up": "pulumi up",
Expand All @@ -19,7 +21,10 @@
"@pulumi/pulumi": "^3.140.0"
},
"devDependencies": {
"@kin0992/oxc-config": "workspace:*",
"@types/node": "^22.10.2",
"oxfmt": "catalog:core",
"oxlint": "catalog:core",
"typescript": "^5.7.2"
}
}
3 changes: 3 additions & 0 deletions oxfmt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@kin0992/oxc-config/oxfmt';

export default config;
3 changes: 3 additions & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@kin0992/oxc-config/oxlint';

export default config;
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,27 @@
"type": "git",
"url": "https://github.com/kin0992/dev-toolkit.git"
},
"type": "module",
"scripts": {
"build": "turbo run build",
"lint": "turbo run lint",
"lint:check": "turbo run lint:check",
"format": "oxfmt",
"format:check": "oxfmt --check",
"test": "turbo run test",
"typecheck": "turbo run typecheck",
"code-review": "pnpm turbo run format:check typecheck lint test",
"code-review": "pnpm format:check && pnpm typecheck && pnpm lint:check && pnpm test",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "turbo run build && changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.31.0",
"oxfmt": "^0.47.0",
"@kin0992/oxc-config": "workspace:*",
"oxfmt": "catalog:core",
"oxlint": "catalog:core",
"turbo": "^2.9.6",
"typescript": "^5.9.3"
"typescript": "catalog:core"
},
"engines": {
"node": ">=22.0.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/eslint-config/oxfmt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@kin0992/oxc-config/oxfmt';

export default config;
8 changes: 8 additions & 0 deletions packages/eslint-config/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import config from '@kin0992/oxc-config/oxlint';

export default {
...config,
options: {
reportUnusedDisableDirectives: 'error',
},
};
11 changes: 11 additions & 0 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@
"access": "restricted",
"registry": "https://npm.pkg.github.com"
},
"scripts": {
"format": "oxfmt",
"format:check": "oxfmt --check",
"lint": "oxlint",
"lint:check": "oxlint"
},
"dependencies": {
"@eslint/js": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"typescript-eslint": "^8.18.2"
},
"devDependencies": {
"@kin0992/oxc-config": "workspace:*",
"oxfmt": "catalog:core",
"oxlint": "catalog:core"
},
"peerDependencies": {
"eslint": "^9.0.0"
}
Expand Down
25 changes: 25 additions & 0 deletions packages/oxc-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# @kin0992/oxc-config

Shared OXC formatter and lint configuration.

## Install

```sh
pnpm add -D @kin0992/oxc-config oxfmt oxlint
```

## Use

```ts
// oxfmt.config.ts
import config from '@kin0992/oxc-config/oxfmt';

export default config;
```

```ts
// oxlint.config.ts
import config from '@kin0992/oxc-config/oxlint';

export default config;
```
3 changes: 3 additions & 0 deletions packages/oxc-config/oxfmt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@kin0992/oxc-config/oxfmt';

export default config;
14 changes: 14 additions & 0 deletions packages/oxc-config/oxfmt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export default {
printWidth: 100,
tabWidth: 2,
semi: true,
singleQuote: true,
trailingComma: 'all',
endOfLine: 'lf',
insertFinalNewline: true,
quoteProps: 'as-needed',
objectWrap: 'preserve',
proseWrap: 'preserve',
sortPackageJson: true,
ignorePatterns: ['dist/**', 'build/**', 'coverage/**', '.turbo/**', 'node_modules/**'],
};
8 changes: 8 additions & 0 deletions packages/oxc-config/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import config from '@kin0992/oxc-config/oxlint';

export default {
...config,
options: {
reportUnusedDisableDirectives: 'error',
},
};
29 changes: 29 additions & 0 deletions packages/oxc-config/oxlint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export default {
categories: {
correctness: 'error',
suspicious: 'error',
},
plugins: ['typescript', 'oxc', 'unicorn', 'import', 'promise', 'node'],
env: {
node: true,
es2024: true,
},
ignorePatterns: ['dist/**', 'build/**', 'coverage/**', '.turbo/**', 'node_modules/**'],
rules: {
'eslint/prefer-const': 'error',
'import/no-cycle': 'error',
'no-console': 'off',
'node/no-process-env': 'off',
'promise/no-return-wrap': 'error',
'typescript/no-explicit-any': 'error',
'unicorn/prefer-node-protocol': 'error',
},
overrides: [
{
files: ['**/*.test.*', '**/*.spec.*', '**/test/**'],
rules: {
'typescript/no-explicit-any': 'off',
},
},
],
};
39 changes: 39 additions & 0 deletions packages/oxc-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "@kin0992/oxc-config",
"version": "0.0.0",
"description": "Shared OXC formatter and lint configuration.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/kin0992/dev-toolkit.git",
"directory": "packages/oxc-config"
},
"files": [
"oxfmt.js",
"oxlint.js",
"README.md"
],
"type": "module",
"exports": {
"./oxfmt": "./oxfmt.js",
"./oxlint": "./oxlint.js"
},
"publishConfig": {
"access": "restricted",
"registry": "https://npm.pkg.github.com"
},
"scripts": {
"format": "oxfmt",
"format:check": "oxfmt --check",
"lint": "oxlint --fix",
"lint:check": "oxlint"
},
"devDependencies": {
"oxfmt": "catalog:core",
"oxlint": "catalog:core"
},
"peerDependencies": {
"oxfmt": "^0.47.0",
"oxlint": "^1.62.0"
}
}
2 changes: 2 additions & 0 deletions packages/prettier-config/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @kin0992/prettier-config

Legacy shared Prettier config. New projects should prefer `@kin0992/oxc-config`.

## Install

```sh
Expand Down
3 changes: 3 additions & 0 deletions packages/prettier-config/oxfmt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@kin0992/oxc-config/oxfmt';

export default config;
8 changes: 8 additions & 0 deletions packages/prettier-config/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import config from '@kin0992/oxc-config/oxlint';

export default {
...config,
options: {
reportUnusedDisableDirectives: 'error',
},
};
12 changes: 12 additions & 0 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@
"index.json",
"README.md"
],
"type": "module",
"main": "index.json",
"publishConfig": {
"access": "restricted",
"registry": "https://npm.pkg.github.com"
},
"scripts": {
"format": "oxfmt",
"format:check": "oxfmt --check",
"lint": "oxlint",
"lint:check": "oxlint"
},
"devDependencies": {
"@kin0992/oxc-config": "workspace:*",
"oxfmt": "catalog:core",
"oxlint": "catalog:core"
}
}
Loading
Loading