@dirstack/kodeks 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -18
- package/configs/oxfmt.json +1 -0
- package/package.json +11 -9
package/README.md
CHANGED
|
@@ -13,14 +13,9 @@ Kodeks provides reusable, opinionated configurations for maintaining consistent
|
|
|
13
13
|
bun add -d @dirstack/kodeks
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
This will automatically install all required dependencies.
|
|
17
|
-
|
|
18
|
-
> [!NOTE]
|
|
19
|
-
> All tools are installed together for simplicity, even if you only use some of the configurations. This ensures all CLIs and configs work correctly and avoids resolution issues.
|
|
20
|
-
|
|
21
16
|
## Usage
|
|
22
17
|
|
|
23
|
-
### oxlint
|
|
18
|
+
### oxlint
|
|
24
19
|
|
|
25
20
|
Create a `.oxlintrc.json` file in your project root:
|
|
26
21
|
|
|
@@ -46,7 +41,7 @@ For TanStack projects, use the TanStack preset:
|
|
|
46
41
|
}
|
|
47
42
|
```
|
|
48
43
|
|
|
49
|
-
### oxfmt
|
|
44
|
+
### oxfmt
|
|
50
45
|
|
|
51
46
|
Since oxfmt does not support configuration inheritance, you have two options:
|
|
52
47
|
|
|
@@ -64,20 +59,18 @@ Add to your `package.json` scripts:
|
|
|
64
59
|
|
|
65
60
|
**Option 2: Copy configuration locally**
|
|
66
61
|
|
|
67
|
-
Copy the configuration file to your project root and reference it directly:
|
|
68
|
-
|
|
69
62
|
```bash
|
|
70
|
-
cp ./node_modules/@dirstack/kodeks/configs/oxfmt.json .
|
|
63
|
+
cp ./node_modules/@dirstack/kodeks/configs/oxfmt.json ./.oxfmtrc.json
|
|
71
64
|
```
|
|
72
65
|
|
|
73
|
-
|
|
66
|
+
### Commitlint
|
|
67
|
+
|
|
68
|
+
Requires `@commitlint/config-conventional` as a peer dependency:
|
|
74
69
|
|
|
75
70
|
```bash
|
|
76
|
-
|
|
71
|
+
bun add -d @commitlint/config-conventional
|
|
77
72
|
```
|
|
78
73
|
|
|
79
|
-
### Commitlint Configuration
|
|
80
|
-
|
|
81
74
|
Create a `commitlint.json` file in your project root:
|
|
82
75
|
|
|
83
76
|
```json
|
|
@@ -86,7 +79,35 @@ Create a `commitlint.json` file in your project root:
|
|
|
86
79
|
}
|
|
87
80
|
```
|
|
88
81
|
|
|
89
|
-
###
|
|
82
|
+
### Semantic Release
|
|
83
|
+
|
|
84
|
+
Requires `conventional-changelog-conventionalcommits` as a peer dependency:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bun add -d semantic-release conventional-changelog-conventionalcommits
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Create a `release.json` file in your project root:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"extends": "@dirstack/kodeks/semantic-release"
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
A dry-run variant is also available for CI validation:
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"extends": "@dirstack/kodeks/semantic-release-dry-run"
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Lefthook
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
bun add -d lefthook
|
|
110
|
+
```
|
|
90
111
|
|
|
91
112
|
Create a `lefthook.json` file in your project root and extend the hooks you need:
|
|
92
113
|
|
|
@@ -101,9 +122,10 @@ Create a `lefthook.json` file in your project root and extend the hooks you need
|
|
|
101
122
|
```
|
|
102
123
|
|
|
103
124
|
**Available hooks:**
|
|
104
|
-
- `lefthook-oxlint.json`
|
|
105
|
-
- `lefthook-oxfmt.json`
|
|
106
|
-
- `lefthook-commitlint.json`
|
|
125
|
+
- `lefthook-oxlint.json` — Lints and fixes staged files with oxlint (pre-commit)
|
|
126
|
+
- `lefthook-oxfmt.json` — Formats staged files with oxfmt (pre-commit)
|
|
127
|
+
- `lefthook-commitlint.json` — Validates commit messages (commit-msg)
|
|
128
|
+
- `lefthook-typescript.json` — Type checks with tsc (pre-commit)
|
|
107
129
|
|
|
108
130
|
## Agentic Coding
|
|
109
131
|
|
package/configs/oxfmt.json
CHANGED
package/package.json
CHANGED
|
@@ -41,18 +41,20 @@
|
|
|
41
41
|
"typescript": "^5.9.3"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@commitlint/
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
44
|
+
"@commitlint/config-conventional": ">=20",
|
|
45
|
+
"conventional-changelog-conventionalcommits": ">=9"
|
|
46
|
+
},
|
|
47
|
+
"peerDependenciesMeta": {
|
|
48
|
+
"@commitlint/config-conventional": {
|
|
49
|
+
"optional": true
|
|
50
|
+
},
|
|
51
|
+
"conventional-changelog-conventionalcommits": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
52
54
|
},
|
|
53
55
|
"engines": {
|
|
54
56
|
"bun": ">=1.0.0"
|
|
55
57
|
},
|
|
56
58
|
"packageManager": "bun@1.3.9",
|
|
57
|
-
"version": "1.0.
|
|
59
|
+
"version": "1.0.2"
|
|
58
60
|
}
|