@dirstack/kodeks 1.0.1 → 1.0.3

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.
Files changed (2) hide show
  1. package/README.md +43 -23
  2. package/package.json +35 -9
package/README.md CHANGED
@@ -7,21 +7,14 @@ Shared linter configurations for TypeScript projects.
7
7
 
8
8
  Kodeks provides reusable, opinionated configurations for maintaining consistent code quality across TypeScript projects.
9
9
 
10
- ## Installation
10
+ ## Usage
11
+
12
+ ### oxlint
11
13
 
12
14
  ```bash
13
- bun add -d @dirstack/kodeks
15
+ bun add -d @dirstack/kodeks oxlint
14
16
  ```
15
17
 
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
- ## Usage
22
-
23
- ### oxlint Configuration
24
-
25
18
  Create a `.oxlintrc.json` file in your project root:
26
19
 
27
20
  ```json
@@ -46,7 +39,11 @@ For TanStack projects, use the TanStack preset:
46
39
  }
47
40
  ```
48
41
 
49
- ### oxfmt Configuration
42
+ ### oxfmt
43
+
44
+ ```bash
45
+ bun add -d @dirstack/kodeks oxfmt
46
+ ```
50
47
 
51
48
  Since oxfmt does not support configuration inheritance, you have two options:
52
49
 
@@ -64,20 +61,16 @@ Add to your `package.json` scripts:
64
61
 
65
62
  **Option 2: Copy configuration locally**
66
63
 
67
- Copy the configuration file to your project root and reference it directly:
68
-
69
64
  ```bash
70
- cp ./node_modules/@dirstack/kodeks/configs/oxfmt.json .
65
+ cp ./node_modules/@dirstack/kodeks/configs/oxfmt.json ./.oxfmtrc.json
71
66
  ```
72
67
 
73
- Then use:
68
+ ### Commitlint
74
69
 
75
70
  ```bash
76
- oxfmt --config ./oxfmt.json --write .
71
+ bun add -d @dirstack/kodeks @commitlint/cli @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,33 @@ Create a `commitlint.json` file in your project root:
86
79
  }
87
80
  ```
88
81
 
89
- ### Lefthook Configuration
82
+ ### Semantic Release
83
+
84
+ ```bash
85
+ bun add -d @dirstack/kodeks semantic-release conventional-changelog-conventionalcommits
86
+ ```
87
+
88
+ Create a `release.json` file in your project root:
89
+
90
+ ```json
91
+ {
92
+ "extends": "@dirstack/kodeks/semantic-release"
93
+ }
94
+ ```
95
+
96
+ A dry-run variant is also available for CI validation:
97
+
98
+ ```json
99
+ {
100
+ "extends": "@dirstack/kodeks/semantic-release-dry-run"
101
+ }
102
+ ```
103
+
104
+ ### Lefthook
105
+
106
+ ```bash
107
+ bun add -d @dirstack/kodeks lefthook
108
+ ```
90
109
 
91
110
  Create a `lefthook.json` file in your project root and extend the hooks you need:
92
111
 
@@ -101,9 +120,10 @@ Create a `lefthook.json` file in your project root and extend the hooks you need
101
120
  ```
102
121
 
103
122
  **Available hooks:**
104
- - `lefthook-oxlint.json` - Lints and fixes staged files with oxlint (pre-commit)
105
- - `lefthook-oxfmt.json` - Formats staged files with oxfmt (pre-commit)
106
- - `lefthook-commitlint.json` - Validates commit messages (commit-msg)
123
+ - `lefthook-oxlint.json` Lints and fixes staged files with oxlint (pre-commit)
124
+ - `lefthook-oxfmt.json` Formats staged files with oxfmt (pre-commit)
125
+ - `lefthook-commitlint.json` Validates commit messages (commit-msg)
126
+ - `lefthook-typescript.json` — Type checks with tsc (pre-commit)
107
127
 
108
128
  ## Agentic Coding
109
129
 
package/package.json CHANGED
@@ -41,18 +41,44 @@
41
41
  "typescript": "^5.9.3"
42
42
  },
43
43
  "peerDependencies": {
44
- "@commitlint/cli": ">=20.4.2",
45
- "@commitlint/config-conventional": ">=20.4.2",
46
- "conventional-changelog-conventionalcommits": ">=9.1.0",
47
- "lefthook": ">=2.1.1",
48
- "oxfmt": ">=0.35.0",
49
- "oxlint": ">=1.50.0",
50
- "semantic-release": ">=25.0.3",
51
- "typescript": ">=5.9.3"
44
+ "@commitlint/cli": ">=20",
45
+ "@commitlint/config-conventional": ">=20",
46
+ "conventional-changelog-conventionalcommits": ">=9",
47
+ "lefthook": ">=2",
48
+ "oxfmt": ">=0.35",
49
+ "oxlint": ">=1",
50
+ "semantic-release": ">=25",
51
+ "typescript": ">=5"
52
+ },
53
+ "peerDependenciesMeta": {
54
+ "@commitlint/cli": {
55
+ "optional": true
56
+ },
57
+ "@commitlint/config-conventional": {
58
+ "optional": true
59
+ },
60
+ "conventional-changelog-conventionalcommits": {
61
+ "optional": true
62
+ },
63
+ "lefthook": {
64
+ "optional": true
65
+ },
66
+ "oxfmt": {
67
+ "optional": true
68
+ },
69
+ "oxlint": {
70
+ "optional": true
71
+ },
72
+ "semantic-release": {
73
+ "optional": true
74
+ },
75
+ "typescript": {
76
+ "optional": true
77
+ }
52
78
  },
53
79
  "engines": {
54
80
  "bun": ">=1.0.0"
55
81
  },
56
82
  "packageManager": "bun@1.3.9",
57
- "version": "1.0.1"
83
+ "version": "1.0.3"
58
84
  }